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

            if (rowsCount > 0)
            {
                MobileSoft.Model.WorkFlow.Tb_WorkFlow_NoticeUser model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new MobileSoft.Model.WorkFlow.Tb_WorkFlow_NoticeUser();
                    if (dt.Rows[n]["InfoId"].ToString() != "")
                    {
                        model.InfoId = int.Parse(dt.Rows[n]["InfoId"].ToString());
                    }
                    model.Tb_Sys_User_UserCode = dt.Rows[n]["Tb_Sys_User_UserCode"].ToString();
                    model.Tb_Dictionary_NoticeMethod_DictionaryCode = dt.Rows[n]["Tb_Dictionary_NoticeMethod_DictionaryCode"].ToString();
                    model.NoticeContent = dt.Rows[n]["NoticeContent"].ToString();
                    model.InstanceId    = dt.Rows[n]["InstanceId"].ToString();
                    model.Tb_Dictionary_InstanceType_DictionaryCode = dt.Rows[n]["Tb_Dictionary_InstanceType_DictionaryCode"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
示例#2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.WorkFlow.Tb_WorkFlow_NoticeUser model)
 {
     dal.Update(model);
 }
示例#3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(MobileSoft.Model.WorkFlow.Tb_WorkFlow_NoticeUser model)
 {
     return(dal.Add(model));
 }