/// <summary>
 /// 得到一个对象实体,从缓存中
 /// </summary>
 public TDTK.PlatForm.MVC4.Model.SYS_SucceedSendMessage2012 GetModelByCache(int SSMID)
 {
     SYS_SucceedSendMessage2012 ssm = new SYS_SucceedSendMessage2012();
     ssm.SSMID = SSMID;
     string CacheKey = "SYS_SucceedSendMessage2012Model-" + SSMID;
     object objModel = Maticsoft.Common.DataCache.GetCache(CacheKey);
     if (objModel == null)
     {
         try
         {
             objModel = dal.GetModel(ssm);
             if (objModel != null)
             {
                 int ModelCache = Maticsoft.Common.ConfigHelper.GetConfigInt("ModelCache");
                 Maticsoft.Common.DataCache.SetCache(CacheKey, objModel, DateTime.Now.AddMinutes(ModelCache), TimeSpan.Zero);
             }
         }
         catch { }
     }
     return (TDTK.PlatForm.MVC4.Model.SYS_SucceedSendMessage2012)objModel;
 }
 public Model.SYS_SucceedSendMessage2012 DataRowToModel(System.Data.DataRow row)
 {
     TDTK.PlatForm.MVC4.Model.SYS_SucceedSendMessage2012 model = new TDTK.PlatForm.MVC4.Model.SYS_SucceedSendMessage2012();
     if (row != null)
     {
         if (row["SSMID"] != null && row["SSMID"].ToString() != "")
         {
             model.SSMID = int.Parse(row["SSMID"].ToString());
         }
         if (row["PhoneNumber"] != null)
         {
             model.PhoneNumber = row["PhoneNumber"].ToString();
         }
         if (row["MContent"] != null)
         {
             model.MContent = row["MContent"].ToString();
         }
         if (row["SucceedDate"] != null && row["SucceedDate"].ToString() != "")
         {
             model.SucceedDate = DateTime.Parse(row["SucceedDate"].ToString());
         }
     }
     return model;
 }
        public Model.SYS_SucceedSendMessage2012 GetModel(Model.SYS_SucceedSendMessage2012 t)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select  top 1 SSMID,PhoneNumber,MContent,SucceedDate from SYS_SucceedSendMessage2012 ");
            strSql.Append(" where SSMID=@SSMID ");
            SqlParameter[] parameters = {
					new SqlParameter("@SSMID", SqlDbType.Int,4)			};
            parameters[0].Value = t.SSMID;

            TDTK.PlatForm.MVC4.Model.SYS_SucceedSendMessage2012 model = new TDTK.PlatForm.MVC4.Model.SYS_SucceedSendMessage2012();
            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
            if (ds.Tables[0].Rows.Count > 0)
            {
                return DataRowToModel(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }
 public SYS_SucceedSendMessage2012 GetModel(SYS_SucceedSendMessage2012 t)
 {
     return dal.GetModel(t);
 }
 public bool Delete(SYS_SucceedSendMessage2012 t)
 {
     return dal.Delete(t);
 }
 public bool Update(SYS_SucceedSendMessage2012 t)
 {
     return dal.Update(t);
 }
 public int Add(SYS_SucceedSendMessage2012 t)
 {
     return dal.Add(t);
 }
 public bool Exists(SYS_SucceedSendMessage2012 t)
 {
     return dal.Exists(t);
 }