Esempio n. 1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <DigiPower.Onlinecol.Standard.Model.T_WorkFlowDoResult_MDL> DataTableToList(DataTable dt)
        {
            List <DigiPower.Onlinecol.Standard.Model.T_WorkFlowDoResult_MDL> modelList = new List <DigiPower.Onlinecol.Standard.Model.T_WorkFlowDoResult_MDL>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                DigiPower.Onlinecol.Standard.Model.T_WorkFlowDoResult_MDL model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new DigiPower.Onlinecol.Standard.Model.T_WorkFlowDoResult_MDL();
                    if (dt.Rows[n]["WorkFlowDoResultID"].ToString() != "")
                    {
                        model.WorkFlowDoResultID = int.Parse(dt.Rows[n]["WorkFlowDoResultID"].ToString());
                    }
                    if (dt.Rows[n]["WorkFlowDefineID"].ToString() != "")
                    {
                        model.WorkFlowDefineID = int.Parse(dt.Rows[n]["WorkFlowDefineID"].ToString());
                    }
                    if (dt.Rows[n]["DoUserID"].ToString() != "")
                    {
                        model.DoUserID = int.Parse(dt.Rows[n]["DoUserID"].ToString());
                    }
                    if (dt.Rows[n]["DoDateTime"].ToString() != "")
                    {
                        model.DoDateTime = DateTime.Parse(dt.Rows[n]["DoDateTime"].ToString());
                    }
                    model.DoResult   = dt.Rows[n]["DoResult"].ToString();
                    model.DoRemark   = dt.Rows[n]["DoRemark"].ToString();
                    model.DoCellPath = dt.Rows[n]["DoCellPath"].ToString();


                    if (dt.Rows[n]["WorkFlowID"].ToString() != "")
                    {
                        model.WorkFlowID = int.Parse(dt.Rows[n]["WorkFlowID"].ToString());
                    }
                    if (dt.Rows[n]["ArchiveID"].ToString() != "")
                    {
                        model.ArchiveID = int.Parse(dt.Rows[n]["ArchiveID"].ToString());
                    }
                    if (dt.Rows[n]["SingleProjectID"].ToString() != "")
                    {
                        model.SingleProjectID = int.Parse(dt.Rows[n]["SingleProjectID"].ToString());
                    }
                    if (dt.Rows[n]["FileListID"].ToString() != "")
                    {
                        model.FileListID = int.Parse(dt.Rows[n]["FileListID"].ToString());
                    }

                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Esempio n. 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(DigiPower.Onlinecol.Standard.Model.T_WorkFlowDoResult_MDL model)
 {
     dal.Update(model);
 }