Example #1
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(MobileSoft.Model.WorkFlow.Tb_WorkFlow_GeneralDecompose model)
 {
     return(dal.Add(model));
 }
Example #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.WorkFlow.Tb_WorkFlow_GeneralDecompose model)
 {
     dal.Update(model);
 }
Example #3
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <MobileSoft.Model.WorkFlow.Tb_WorkFlow_GeneralDecompose> DataTableToList(DataTable dt)
        {
            List <MobileSoft.Model.WorkFlow.Tb_WorkFlow_GeneralDecompose> modelList = new List <MobileSoft.Model.WorkFlow.Tb_WorkFlow_GeneralDecompose>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                MobileSoft.Model.WorkFlow.Tb_WorkFlow_GeneralDecompose model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new MobileSoft.Model.WorkFlow.Tb_WorkFlow_GeneralDecompose();
                    if (dt.Rows[n]["GeneralDecomposeCode"].ToString() != "")
                    {
                        model.GeneralDecomposeCode = new Guid(dt.Rows[n]["GeneralDecomposeCode"].ToString());
                    }
                    if (dt.Rows[n]["GeneralMainCode"].ToString() != "")
                    {
                        model.GeneralMainCode = new Guid(dt.Rows[n]["GeneralMainCode"].ToString());
                    }
                    //model.CutID=dt.Rows[n]["CutID"].ToString();
                    model.DecomposeCode = dt.Rows[n]["DecomposeCode"].ToString();
                    model.DisposeMan    = dt.Rows[n]["DisposeMan"].ToString();
                    if (dt.Rows[n]["DisposePope"].ToString() != "")
                    {
                        model.DisposePope = int.Parse(dt.Rows[n]["DisposePope"].ToString());
                    }
                    if (dt.Rows[n]["IsFinishPope"].ToString() != "")
                    {
                        model.IsFinishPope = int.Parse(dt.Rows[n]["IsFinishPope"].ToString());
                    }
                    if (dt.Rows[n]["IsRemind"].ToString() != "")
                    {
                        model.IsRemind = int.Parse(dt.Rows[n]["IsRemind"].ToString());
                    }
                    if (dt.Rows[n]["RemindTime"].ToString() != "")
                    {
                        model.RemindTime = DateTime.Parse(dt.Rows[n]["RemindTime"].ToString());
                    }
                    model.RemindMode = dt.Rows[n]["RemindMode"].ToString();
                    if (dt.Rows[n]["InstTime"].ToString() != "")
                    {
                        model.InstTime = DateTime.Parse(dt.Rows[n]["InstTime"].ToString());
                    }
                    if (dt.Rows[n]["SignTime"].ToString() != "")
                    {
                        model.SignTime = DateTime.Parse(dt.Rows[n]["SignTime"].ToString());
                    }
                    model.Memo = dt.Rows[n]["Memo"].ToString();
                    if (dt.Rows[n]["RemindState"].ToString() != "")
                    {
                        model.RemindState = int.Parse(dt.Rows[n]["RemindState"].ToString());
                    }
                    if (dt.Rows[n]["DisposeResult"].ToString() != "")
                    {
                        model.DisposeResult = int.Parse(dt.Rows[n]["DisposeResult"].ToString());
                    }
                    if (dt.Rows[n]["DisposeTime"].ToString() != "")
                    {
                        model.DisposeTime = DateTime.Parse(dt.Rows[n]["DisposeTime"].ToString());
                    }
                    if (dt.Rows[n]["DisposeState"].ToString() != "")
                    {
                        model.DisposeState = int.Parse(dt.Rows[n]["DisposeState"].ToString());
                    }
                    if (dt.Rows[n]["msrepl_tran_version"].ToString() != "")
                    {
                        model.msrepl_tran_version = new Guid(dt.Rows[n]["msrepl_tran_version"].ToString());
                    }
                    model.TYPE           = dt.Rows[n]["TYPE"].ToString();
                    model.DisposeDepCode = dt.Rows[n]["DisposeDepCode"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }