| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- using Castle.ActiveRecord;
- using NHibernate.Criterion;
- using System.Text;
- namespace BizCom
- {
- [ActiveRecord("CE_ErpOrderFormData")]
- public class CeErpOrderFormData : ComBase<CeErpOrderFormData>
- {
- /// <summary>
- ///
- /// </summary>
- [PrimaryKey(PrimaryKeyType.Native)]
- public int ID { get; set; }
- private string _tid = "";
- /// <summary>
- ///订单tid
- /// </summary>
- [Property]
- public string tid
- {
- get { return _tid; }
- set { _tid = value; }
- }
- //內容
- public string _content = "";
- [Property]
- public string content
- {
- get { return _content; }
- set { _content = value; }
- }
- //用戶id
- public int _userId = 0;
- [Property]
- public int userId
- {
- get { return _userId; }
- set { _userId = value; }
- }
- public static CeErpOrderFormData GetByTid(string tid)
- {
- return FindFirst(Expression.Eq("tid", tid));
- }
- public static void DelByTid(object tid)
- {
- StringBuilder sql = new StringBuilder();
- sql.AppendFormat("delete from CE_ErpOrderFormData where tid='" + tid + "'");
- ExecuteNonQuery(sql.ToString());
- }
- public static void Del(object id)
- {
- StringBuilder sql = new StringBuilder();
- sql.AppendFormat("delete from CE_ErpOrderFormData where id=" + id);
- ExecuteNonQuery(sql.ToString());
- }
- }
- }
|