예제 #1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <MobileSoft.Model.Common.Tb_SendMessageRecord> DataTableToList(DataTable dt)
        {
            List <MobileSoft.Model.Common.Tb_SendMessageRecord> modelList = new List <MobileSoft.Model.Common.Tb_SendMessageRecord>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                MobileSoft.Model.Common.Tb_SendMessageRecord model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model             = new MobileSoft.Model.Common.Tb_SendMessageRecord();
                    model.Id          = dt.Rows[n]["Id"].ToString();
                    model.Mobile      = dt.Rows[n]["Mobile"].ToString();
                    model.SendContent = dt.Rows[n]["SendContent"].ToString();
                    if (dt.Rows[n]["SendTime"].ToString() != "")
                    {
                        model.SendTime = DateTime.Parse(dt.Rows[n]["SendTime"].ToString());
                    }
                    model.MacCode   = dt.Rows[n]["MacCode"].ToString();
                    model.SendType  = dt.Rows[n]["SendType"].ToString();
                    model.SendState = dt.Rows[n]["SendState"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
예제 #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.Common.Tb_SendMessageRecord model)
 {
     dal.Update(model);
 }
예제 #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 private void Add(MobileSoft.Model.Common.Tb_SendMessageRecord model)
 {
     dal.Add(model);
 }