/// <summary> /// 获得数据列表 /// </summary> public List <MobileSoft.Model.WorkFlow.Tb_WorkFlow_CheckLevel> DataTableToList(DataTable dt) { List <MobileSoft.Model.WorkFlow.Tb_WorkFlow_CheckLevel> modelList = new List <MobileSoft.Model.WorkFlow.Tb_WorkFlow_CheckLevel>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { MobileSoft.Model.WorkFlow.Tb_WorkFlow_CheckLevel model; for (int n = 0; n < rowsCount; n++) { model = new MobileSoft.Model.WorkFlow.Tb_WorkFlow_CheckLevel(); if (dt.Rows[n]["InfoId"].ToString() != "") { model.InfoId = int.Parse(dt.Rows[n]["InfoId"].ToString()); } if (dt.Rows[n]["InstanceInfoId"].ToString() != "") { model.InstanceInfoId = int.Parse(dt.Rows[n]["InstanceInfoId"].ToString()); } if (dt.Rows[n]["WorkFlowInfoId"].ToString() != "") { model.WorkFlowInfoId = int.Parse(dt.Rows[n]["WorkFlowInfoId"].ToString()); } model.StartUserCode = dt.Rows[n]["StartUserCode"].ToString(); model.CheckUserCode = dt.Rows[n]["CheckUserCode"].ToString(); if (dt.Rows[n]["CheckType"].ToString() != "") { model.CheckType = int.Parse(dt.Rows[n]["CheckType"].ToString()); } if (dt.Rows[n]["OprState"].ToString() != "") { model.OprState = int.Parse(dt.Rows[n]["OprState"].ToString()); } if (dt.Rows[n]["RecordDate"].ToString() != "") { model.RecordDate = DateTime.Parse(dt.Rows[n]["RecordDate"].ToString()); } if (dt.Rows[n]["Sort"].ToString() != "") { model.Sort = int.Parse(dt.Rows[n]["Sort"].ToString()); } if (dt.Rows[n]["IsGoToNext"].ToString() != "") { model.IsGoToNext = int.Parse(dt.Rows[n]["IsGoToNext"].ToString()); } modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(MobileSoft.Model.WorkFlow.Tb_WorkFlow_CheckLevel model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(MobileSoft.Model.WorkFlow.Tb_WorkFlow_CheckLevel model) { return(dal.Add(model)); }