예제 #1
0
        public List <Chain.Model.SysCustomRemind> DataTableToList(DataTable dt)
        {
            List <Chain.Model.SysCustomRemind> modelList = new List <Chain.Model.SysCustomRemind>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                for (int i = 0; i < rowsCount; i++)
                {
                    Chain.Model.SysCustomRemind model = new Chain.Model.SysCustomRemind();
                    if (dt.Rows[i]["CustomRemindID"] != null && dt.Rows[i]["CustomRemindID"].ToString() != "")
                    {
                        model.CustomRemindID = int.Parse(dt.Rows[i]["CustomRemindID"].ToString());
                    }
                    if (dt.Rows[i]["CustomRemindTitle"] != null && dt.Rows[i]["CustomRemindTitle"].ToString() != "")
                    {
                        model.CustomRemindTitle = dt.Rows[i]["CustomRemindTitle"].ToString();
                    }
                    if (dt.Rows[i]["CustomRemindDetail"] != null && dt.Rows[i]["CustomRemindDetail"].ToString() != "")
                    {
                        model.CustomRemindDetail = dt.Rows[i]["CustomRemindDetail"].ToString();
                    }
                    if (dt.Rows[i]["CustomReminder"] != null && dt.Rows[i]["CustomReminder"].ToString() != "")
                    {
                        model.CustomReminder = dt.Rows[i]["CustomReminder"].ToString();
                    }
                    if (dt.Rows[i]["CustomRemindTime"] != null && dt.Rows[i]["CustomRemindTime"].ToString() != "")
                    {
                        model.CustomRemindTime = DateTime.Parse(dt.Rows[i]["CustomRemindTime"].ToString());
                    }
                    if (dt.Rows[i]["CustomRemindCreateTime"] != null && dt.Rows[i]["CustomRemindCreateTime"].ToString() != "")
                    {
                        model.CustomRemindCreateTime = DateTime.Parse(dt.Rows[i]["CustomRemindCreateTime"].ToString());
                    }
                    if (dt.Rows[i]["CustomRemindShopID"] != null && dt.Rows[i]["CustomRemindShopID"].ToString() != "")
                    {
                        model.CustomRemindShopID = int.Parse(dt.Rows[i]["CustomRemindShopID"].ToString());
                    }
                    if (dt.Rows[i]["CustomRemindUserID"] != null && dt.Rows[i]["CustomRemindUserID"].ToString() != "")
                    {
                        model.CustomRemindUserID = int.Parse(dt.Rows[i]["CustomRemindUserID"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
예제 #2
0
 public bool Update(Chain.Model.SysCustomRemind model)
 {
     return(this.dal.Update(model));
 }
예제 #3
0
 public int Add(Chain.Model.SysCustomRemind model)
 {
     return(this.dal.Add(model));
 }