private void LoadOperateData() { this.tvOperate.Nodes.Clear(); string jsonresult = MyMenuManageService.GetAllMenu(); FeedbackInfomation fi = JsonConvert.DeserializeObject <FeedbackInfomation>(jsonresult); string jsonresult1 = MyOperationManageService.GetAllOperation(); FeedbackInfomation fi1 = JsonConvert.DeserializeObject <FeedbackInfomation>(jsonresult1); if (fi.ErrorStatus == STATUS_ADAPTER.SAVE_SUCCESS) { DataSet ds = JsonConvert.DeserializeObject <DataSet>(fi.Result.ToString()); if (fi1.Result != null) { dsope = JsonConvert.DeserializeObject <DataSet>(fi1.Result.ToString()); } DataRow[] drs = ds.Tables[0].Select("Meu_FatherMenuID = 0"); foreach (DataRow dr in drs) { TreeNode tn = new TreeNode(); tn.Text = dr["Meu_Menu"].ToString(); tn.Tag = Convert.ToInt32(dr["Meu_ID"]); this.tvOperate.Nodes.Add(tn); CreatSubMenu1(tn, dr); CreatOperation(tn, dr); } } else { CMSTMsgBox.MsgBox.ShowDialog(fi.FeedbackMessage); } }
private void btnTestConnect_Click(object sender, EventArgs e) { string dbip = this.txtDBIp.Text; string dbport = this.txtDBPort.Text; string dbname = this.txtDBName.Text; string dbsa = this.txtDBSa.Text; string dbpwd = this.txtDBPwd.Text; FeedbackInfomation fi = new FeedbackInfomation(); fi = DataValidate.ValidateIpAddress(dbip); if (fi.ErrorStatus != STATUS_ADAPTER.IP_NORMAL) { MsgBox.ShowDialog(Tips.DB + fi.FeedbackMessage); return; } DBTestBLL dtbll = new DBTestBLL(); fi = dtbll.TestDBConnect(dbip, dbport, dbname, dbsa, dbpwd); if (fi.ErrorStatus == STATUS_ADAPTER.DB_CONNECT_NORMAL) { this.labDBStatus.Text = "状态:" + this.STATUS_DBTEST_CONNECTED; SetDbStatus(); //MsgBox.ShowDialog(Tips.DB_CONNECTTEST_SUCCESS); } else { this.labDBStatus.Text = this.STATUS_DBTEST_NOCONNECTED; MsgBox.ShowDialog(Tips.DB_CONNECTTEST_FAILED); } }
private void btnSave_Click(object sender, EventArgs e) { if (this.txtMenuName.Text == "") { CMSTMsgBox.MsgBox.ShowDialog("菜单名称不能为空!!!"); return; } SetMenu(); string jsonresult = MyMenuManageService.SaveMenu(me); FeedbackInfomation fi = JsonConvert.DeserializeObject <FeedbackInfomation>(jsonresult); if (fi.ErrorStatus == STATUS_ADAPTER.SAVE_SUCCESS) { int ret = JsonConvert.DeserializeObject <int>(fi.Result.ToString()); if (ret > 0) { CMSTMsgBox.MsgBox.ShowDialog("保存成功!!!"); this.btnSave.Enabled = true; ClearMenuInfo(); LoadMenuData(); } } else { CMSTMsgBox.MsgBox.ShowDialog(fi.FeedbackMessage); } }
public FeedbackInfomation TestMGDBConnect(string dbip, string dbport, string dbname, string uid, string pwd) { FeedbackInfomation fi = new FeedbackInfomation(); SqlDataHelper.SetConnMgStr(dbip, dbport, dbname, uid, pwd); try { if (SqlDataHelper.ConnectionMgTest()) { fi.ErrorStatus = STATUS_ADAPTER.DB_CONNECT_NORMAL; fi.FeedbackMessage = ""; fi.Result = Tips.DB_CONNECTTEST_SUCCESS; return(fi); } else { fi.ErrorStatus = STATUS_ADAPTER.DB_CONNECT_FAILD; fi.FeedbackMessage = ""; fi.Result = Tips.DB_CONNECTTEST_FAILED; return(fi); } } catch (Exception ex) { fi.ErrorStatus = STATUS_ADAPTER.DB_CONNECT_FAILD; fi.FeedbackMessage = ex.Message.ToString(); fi.Result = Tips.DB_CONNECTTEST_FAILED; return(fi); } }
private void btnSaveOperate_Click(object sender, EventArgs e) { if (this.txtOperateName.Text == "") { CMSTMsgBox.MsgBox.ShowDialog("操作名称不能为空!!!"); return; } SetOperation(); string jsonresult = MyOperationManageService.SaveOperation(oe); FeedbackInfomation fi = JsonConvert.DeserializeObject <FeedbackInfomation>(jsonresult); if (fi.ErrorStatus == STATUS_ADAPTER.SAVE_SUCCESS) { int ret = JsonConvert.DeserializeObject <int>(fi.Result.ToString()); if (ret > 0) { CMSTMsgBox.MsgBox.ShowDialog("保存成功!!!"); ClearOperationInfo(); LoadOperateData(); } } else { CMSTMsgBox.MsgBox.ShowDialog(fi.FeedbackMessage); } }
public FeedbackInfomation CheckStocktakingDetail(long stocktakingId, long stocktakingDetailId, int result, int checker, string remark) { FeedbackInfomation fi = new FeedbackInfomation(); try { using (SqlConnection conn = SqlDataHelper.GetConnection()) { conn.Open(); SqlTransaction st = conn.BeginTransaction(); CheckDetail(stocktakingId, stocktakingDetailId, result, checker, remark, st); StocktakingBillDetail sbd = MySMDAL.SelectStocktakingBillDetail(stocktakingDetailId, st); st.Commit(); fi.Result = sbd; fi.FeedbackMessage = Tips.CHECK_SUCCESS; fi.ErrorStatus = STATUS_ADAPTER.CHECK_SUCCESS; return(fi); } } catch (Exception ex) { fi.Result = null; fi.ErrorStatus = STATUS_ADAPTER.CHECK_FAILED; fi.FeedbackMessage = Tips.CHECK_SUCCESS + ":" + ex.Message.ToString(); return(fi); } }
public FeedbackInfomation QueryStocktakingBillDetial(long stocktakingDetailId) { FeedbackInfomation fi = new FeedbackInfomation(); try { StocktakingBillDetail sbd = MySMDAL.SelectStocktakingBillDetail(stocktakingDetailId); if (sbd != null) { fi.Result = sbd; fi.FeedbackMessage = ""; fi.ErrorStatus = STATUS_ADAPTER.QUERY_NORMAL; } else { fi.Result = null; fi.FeedbackMessage = Tips.QERUY_RESULT_EMPTY; fi.ErrorStatus = STATUS_ADAPTER.QUERY_NODATA; } return(fi); } catch (Exception ex) { fi.Result = null; fi.FeedbackMessage = Tips.QUERY_FAILED + ":" + ex.Message.ToString(); fi.ErrorStatus = STATUS_ADAPTER.QUERY_ERROR; return(fi); } }
public FeedbackInfomation AddStocktakingBill(StockModel sb) { FeedbackInfomation fi = new FeedbackInfomation(); try { using (SqlConnection conn = SqlDataHelper.GetConnection()) { conn.Open(); SqlTransaction st = conn.BeginTransaction(); sb.Status = BaseInfo.FindBillStatusIDByName("未盘点"); long id = MySMDAL.InsertStocktakingBill(sb, st); sb.StocktakingID = id; bool ret = MySMDAL.GenerateStocktakingDetailInfo(sb, BaseInfo.FindBillStatusIDByName("未盘点"), st); sb = MySMDAL.SelectStocktakingBill(sb.CmstID, sb.StocktakingID, st); st.Commit(); } fi.FeedbackMessage = Tips.SAVE_SUCCESS; fi.ErrorStatus = STATUS_ADAPTER.SAVE_SUCCESS; fi.Result = sb; return(fi); } catch (Exception ex) { fi.FeedbackMessage = ex.Message.ToString(); fi.ErrorStatus = STATUS_ADAPTER.SAVE_FAILED; fi.Result = null; return(fi); } }
public string CheckRateTypeName(string name) { string result = ""; if (name != null && name.Trim() != "") { string jsonresult = MyBaseMessageService.GetRateTypeByName(name); FeedbackInfomation fi = JsonConvert.DeserializeObject <FeedbackInfomation>(jsonresult); if (fi.ErrorStatus == STATUS_ADAPTER.QUERY_NORMAL) { if (fi.Result == null) { result = "正确"; } else { result = "该名称已存在!"; } } else { result = fi.FeedbackMessage; } } else { result = "名称不能为空!"; } return(result); }
public FeedbackInfomation QueryStocktakingBillDetailsInfo(long stocktakingId) { FeedbackInfomation fi = new FeedbackInfomation(); try { DataSet ds = MySMDAL.SelectStocktakingDetails(stocktakingId); if (DataValidate.CheckDataSetNotEmpty(ds)) { fi.Result = ds; fi.FeedbackMessage = ""; fi.ErrorStatus = STATUS_ADAPTER.QUERY_NORMAL; } else { fi.Result = null; fi.FeedbackMessage = Tips.QERUY_RESULT_EMPTY; fi.ErrorStatus = STATUS_ADAPTER.QUERY_NODATA; } return(fi); } catch (Exception ex) { fi.Result = null; fi.FeedbackMessage = Tips.QUERY_FAILED + ":" + ex.Message.ToString(); fi.ErrorStatus = STATUS_ADAPTER.QUERY_ERROR; return(fi); } }
public void BtnDepotsSave(object sender, EventArgs e) { DepotsPropertyEntity dpe = new DepotsPropertyEntity() { DprName = this.View.TxtDepotsName.Text, DprRemark = this.View.TxtDepotsRemark.Text, DprIfUse = this.View.CboDepotsIfUse.Checked }; if (this.View.TxtDepotsId.Text != null && this.View.TxtDepotsId.Text != "") { dpe.DprId = Convert.ToInt32(this.View.TxtDepotsId.Text); string jsonresult = MyBaseMessageService.EditDepotsProperty(dpe); FeedbackInfomation fi = JsonConvert.DeserializeObject <FeedbackInfomation>(jsonresult); if (fi.ErrorStatus == STATUS_ADAPTER.SAVE_SUCCESS) { LoadDepotsPropertyData(); this.View.DgvDepots.Rows[depotsRowIndex].Selected = true; MsgBox.ShowDialog(fi.FeedbackMessage, "信息提示"); } else { MsgBox.ShowDialog(fi.FeedbackMessage, "信息提示", MsgBox.MyButtons.OKCancel, true); } } else { string result = CheckDepotsName(dpe.DprName); if (result == "正确") { string jsonresult = MyBaseMessageService.AddDepotsProperty(dpe); FeedbackInfomation fi = JsonConvert.DeserializeObject <FeedbackInfomation>(jsonresult); if (fi.ErrorStatus == STATUS_ADAPTER.INSERT_NORMAL) { LoadDepotsPropertyData(); this.View.DgvDepots.Rows[this.View.DgvDepots.Rows.Count - 1].Selected = true; MsgBox.ShowDialog(fi.FeedbackMessage, "信息提示"); } else { MsgBox.ShowDialog(fi.FeedbackMessage, "信息提示", MsgBox.MyButtons.OKCancel, true); } } else { MsgBox.ShowDialog(result, "信息提示", MsgBox.MyButtons.OKCancel, true); } } this.View.TxtDepotsName.Enabled = false; this.View.TxtDepotsRemark.Enabled = false; this.View.CboDepotsIfUse.Enabled = false; this.View.BtnDepotsSave.Enabled = false; this.View.BtnDepotsAdd.Enabled = true; }
public void BtnRateTypeSave(object sender, EventArgs e) { RateTypeEntity rte = new RateTypeEntity() { RtyName = this.View.TxtRateTypeName.Text, RtyRemark = this.View.TxtRateTypeRemark.Text, RtyIfUse = this.View.CboRateTypeIfUse.Checked }; if (this.View.TxtRateTypeId.Text != null && this.View.TxtRateTypeId.Text != "") { rte.RtyId = Convert.ToInt32(this.View.TxtRateTypeId.Text); string jsonresult = MyBaseMessageService.EditRateType(rte); FeedbackInfomation fi = JsonConvert.DeserializeObject <FeedbackInfomation>(jsonresult); if (fi.ErrorStatus == STATUS_ADAPTER.SAVE_SUCCESS) { LoadRateTypeData(); this.View.DgvRateType.Rows[rateTypeRowIndex].Selected = true; MsgBox.ShowDialog(fi.FeedbackMessage, "信息提示"); } else { MsgBox.ShowDialog(fi.FeedbackMessage, "信息提示", MsgBox.MyButtons.OKCancel, true); } } else { string result = CheckRateTypeName(rte.RtyName); if (result == "正确") { string jsonresult = MyBaseMessageService.AddRateType(rte); FeedbackInfomation fi = JsonConvert.DeserializeObject <FeedbackInfomation>(jsonresult); if (fi.ErrorStatus == STATUS_ADAPTER.INSERT_NORMAL) { LoadRateTypeData(); this.View.DgvRateType.Rows[this.View.DgvRateType.Rows.Count - 1].Selected = true; MsgBox.ShowDialog(fi.FeedbackMessage, "信息提示"); } else { MsgBox.ShowDialog(fi.FeedbackMessage, "信息提示", MsgBox.MyButtons.OKCancel, true); } } else { MsgBox.ShowDialog(result, "信息提示", MsgBox.MyButtons.OKCancel, true); } } this.View.TxtRateTypeName.Enabled = false; this.View.TxtRateTypeRemark.Enabled = false; this.View.CboRateTypeIfUse.Enabled = false; this.View.BtnRateTypeSave.Enabled = false; this.View.BtnRateTypeAdd.Enabled = true; }
public void BtnMeasureSave(object sender, EventArgs e) { MeasureWayEntity mwe = new MeasureWayEntity() { MwaName = this.View.TxtMeasureName.Text, MwaRemark = this.View.TxtMeasureRemark.Text, MwaIfUse = this.View.CboMeasureIfUse.Checked }; if (this.View.TxtMeasureId.Text != null && this.View.TxtMeasureId.Text != "") { mwe.MwaId = Convert.ToInt32(this.View.TxtMeasureId.Text); string jsonresult = MyBaseMessageService.EditMeasureWay(mwe); FeedbackInfomation fi = JsonConvert.DeserializeObject <FeedbackInfomation>(jsonresult); if (fi.ErrorStatus == STATUS_ADAPTER.SAVE_SUCCESS) { LoadMeasureWayData(); this.View.DgvMeasure.Rows[measureRowIndex].Selected = true; MsgBox.ShowDialog(fi.FeedbackMessage, "信息提示"); } else { MsgBox.ShowDialog(fi.FeedbackMessage, "信息提示", MsgBox.MyButtons.OKCancel, true); } } else { string result = CheckMeasureName(mwe.MwaName); if (result == "正确") { string jsonresult = MyBaseMessageService.AddMeasureWay(mwe); FeedbackInfomation fi = JsonConvert.DeserializeObject <FeedbackInfomation>(jsonresult); if (fi.ErrorStatus == STATUS_ADAPTER.INSERT_NORMAL) { LoadMeasureWayData(); this.View.DgvMeasure.Rows[this.View.DgvMeasure.Rows.Count - 1].Selected = true; MsgBox.ShowDialog(fi.FeedbackMessage, "信息提示"); } else { MsgBox.ShowDialog(fi.FeedbackMessage, "信息提示", MsgBox.MyButtons.OKCancel, true); } } else { MsgBox.ShowDialog(result, "信息提示", MsgBox.MyButtons.OKCancel, true); } } this.View.TxtMeasureName.Enabled = false; this.View.TxtMeasureRemark.Enabled = false; this.View.CboMeasureIfUse.Enabled = false; this.View.BtnMeasureSave.Enabled = false; this.View.BtnMeasureAdd.Enabled = true; }
public void Instantiation() { string url = "http://127.0.0.1:8082/StockTakingManage"; StockTakingManage.StockTakingManageProxyClient stock = new StockTakingManage.StockTakingManageProxyClient(GetWSHttpBinding(), new EndpointAddress(url)); //StockModelData.StockModel sm = new StockModelData.StockModel(); //stock.Endpoint.EndpointBehaviors.Add(new MyEndpointBehavior()); string fi = stock.QueryStocktakingBillDetailsInfo(8); FeedbackInfomation fi1 = JsonConvert.DeserializeObject <FeedbackInfomation>(fi); DataSet ds = JsonConvert.DeserializeObject <DataSet>(fi1.Result.ToString()); dt = ds.Tables[0]; dataGridView1.DataSource = dt; }
public void LoadRateTypeData() { string jsonresult = MyBaseMessageService.GetAllRateType(); FeedbackInfomation fi = JsonConvert.DeserializeObject <FeedbackInfomation>(jsonresult); if (fi.ErrorStatus == STATUS_ADAPTER.QUERY_NORMAL) { List <RateTypeEntity> MyRtes = JsonConvert.DeserializeObject <List <RateTypeEntity> >(fi.Result.ToString()); this.View.SetRateTypeDataSource(MyRtes); } else { MsgBox.ShowDialog(fi.FeedbackMessage, "信息提示", MsgBox.MyButtons.OKCancel, true); } }
private void btnQuery_Click(object sender, EventArgs e) { string jsonresult = MyOrganizationService.GetAllOrganization(); FeedbackInfomation fi = JsonConvert.DeserializeObject <FeedbackInfomation>(jsonresult); if (fi.ErrorStatus == STATUS_ADAPTER.SAVE_SUCCESS) { oes = JsonConvert.DeserializeObject <List <OrganizationEntity> >(fi.Result.ToString()); this.dgvOrganization.DataSource = oes; } else { MsgBox.ShowDialog(fi.FeedbackMessage); } }
public System.Data.DataSet GetColInfo(string name, string type) { FeedbackInfomation fi = new FeedbackInfomation(); string jsonResult = MyUIDisplayProxy.GetUICol(name, type); fi = JsonConvert.DeserializeObject <FeedbackInfomation>(jsonResult); if (fi.ErrorStatus == STATUS_ADAPTER.QUERY_NORMAL) { DataSet ds = JsonConvert.DeserializeObject <DataSet>(fi.Result.ToString()); return(ds); } else { return(null); } }
public DataSet GetTableStruct(string tablename) { FeedbackInfomation fi = new FeedbackInfomation(); string jsonResult = MyUIDisplayProxy.GetUITableStruct(tablename); fi = JsonConvert.DeserializeObject <FeedbackInfomation>(jsonResult); if (fi.ErrorStatus == STATUS_ADAPTER.QUERY_NORMAL) { DataSet ds = JsonConvert.DeserializeObject <DataSet>(fi.Result.ToString()); return(ds); } else { return(null); } }
public FeedbackInfomation OperatorAuth() { FeedbackInfomation fi = new FeedbackInfomation(); try { // StocktakingBillDetail sbd = MySMDAL.SelectStocktakingBillDetail(stocktakingDetailId); return(fi); } catch (Exception ex) { fi.Result = null; fi.FeedbackMessage = Tips.QUERY_FAILED + ":" + ex.Message.ToString(); fi.ErrorStatus = STATUS_ADAPTER.QUERY_ERROR; return(fi); } }
public FeedbackInfomation GetAllMenu() { FeedbackInfomation fi = new FeedbackInfomation(); try { fi.Result = MyMenuManageDAL.SelectAllMenu(); fi.ErrorStatus = STATUS_ADAPTER.SAVE_SUCCESS; fi.FeedbackMessage = ""; return(fi); } catch (Exception ex) { fi.Result = ""; fi.ErrorStatus = STATUS_ADAPTER.SAVE_FAILED; fi.FeedbackMessage = ex.Message.ToString(); return(fi); } }
public FeedbackInfomation SaveMenu(MenuEntity me) { FeedbackInfomation fi = new FeedbackInfomation(); try { fi.Result = MyMenuManageDAL.InsertMenu(me); fi.ErrorStatus = STATUS_ADAPTER.SAVE_SUCCESS; fi.FeedbackMessage = ""; return(fi); } catch (Exception ex) { fi.Result = ""; fi.ErrorStatus = STATUS_ADAPTER.SAVE_FAILED; fi.FeedbackMessage = ex.Message.ToString(); return(fi); } }
public FeedbackInfomation GetAllStorageWay() { FeedbackInfomation fi = new FeedbackInfomation(); try { fi.Result = MyBaseMessageDAL.SelectAllStorageWayEntity(); fi.ErrorStatus = STATUS_ADAPTER.QUERY_NORMAL; fi.FeedbackMessage = ""; return(fi); } catch (Exception ex) { fi.Result = ""; fi.ErrorStatus = STATUS_ADAPTER.QUERY_ERROR; fi.FeedbackMessage = ex.Message.ToString(); return(fi); } }
public FeedbackInfomation GetDepotsPropertyByName(string name) { FeedbackInfomation fi = new FeedbackInfomation(); try { fi.Result = MyBaseMessageDAL.SelectDepotsPropertyByName(name); fi.ErrorStatus = STATUS_ADAPTER.QUERY_NORMAL; fi.FeedbackMessage = ""; return(fi); } catch (Exception ex) { fi.Result = ""; fi.ErrorStatus = STATUS_ADAPTER.QUERY_ERROR; fi.FeedbackMessage = ex.Message.ToString(); return(fi); } }
public FeedbackInfomation EditDepotsProperty(DepotsPropertyEntity de) { FeedbackInfomation fi = new FeedbackInfomation(); try { fi.Result = MyBaseMessageDAL.UpdateDepotsProperty(de); fi.ErrorStatus = STATUS_ADAPTER.SAVE_SUCCESS; fi.FeedbackMessage = "修改成功"; return(fi); } catch (Exception ex) { fi.Result = ""; fi.ErrorStatus = STATUS_ADAPTER.SAVE_FAILED; fi.FeedbackMessage = ex.Message.ToString(); return(fi); } }
public FeedbackInfomation GetOrganizationByID(int cmstID) { FeedbackInfomation fi = new FeedbackInfomation(); try { fi.Result = MyOrganizationDAL.SelectOrganizationByID(cmstID); fi.ErrorStatus = STATUS_ADAPTER.SAVE_SUCCESS; fi.FeedbackMessage = ""; return(fi); } catch (Exception ex) { fi.Result = ""; fi.ErrorStatus = STATUS_ADAPTER.SAVE_FAILED; fi.FeedbackMessage = ex.Message.ToString(); return(fi); } }
public FeedbackInfomation AddRateType(RateTypeEntity rte) { FeedbackInfomation fi = new FeedbackInfomation(); try { fi.Result = MyBaseMessageDAL.InsertRateType(rte); fi.ErrorStatus = STATUS_ADAPTER.INSERT_NORMAL; fi.FeedbackMessage = "新增成功"; return(fi); } catch (Exception ex) { fi.Result = ""; fi.ErrorStatus = STATUS_ADAPTER.INSERT_ERROR; fi.FeedbackMessage = ex.Message.ToString(); return(fi); } }
private void btnSave_Click(object sender, EventArgs e) { if (this.txtcode.Text.Trim() == "" || this.txtName.Text.Trim() == "" || this.txtSysAccount.Text.Trim() == "") { MsgBox.ShowDialog("帐套编号,名称不能为空!!!"); return; } OrganizationEntity oe = new OrganizationEntity(); SetOrganization(oe); string jsonresult = MyOrganizationService.SaveOrganization(oe); FeedbackInfomation fi = JsonConvert.DeserializeObject <FeedbackInfomation>(jsonresult); if (fi.ErrorStatus == STATUS_ADAPTER.SAVE_SUCCESS) { MsgBox.ShowDialog("保存成功!!!"); this.btnSaveCmst.Enabled = false; } else { MsgBox.ShowDialog(fi.FeedbackMessage); } }
/// <summary> /// 创建账套 /// </summary> /// <param name="oe"></param> /// <returns></returns> public FeedbackInfomation SaveOrganization(OrganizationEntity oe) { FeedbackInfomation fi = new FeedbackInfomation(); try { using (TransactionScope scope = new TransactionScope()) { //判断账套编号和名称是否重复 if (CheckCmstID(oe.CmstID)) { fi.ErrorStatus = STATUS_ADAPTER.SAVE_FAILED; fi.Result = oe; fi.FeedbackMessage = "账套编号重复"; return(fi); } if (CheckCmstName(oe.CmstName)) { fi.ErrorStatus = STATUS_ADAPTER.SAVE_FAILED; fi.Result = oe; fi.FeedbackMessage = "账套名称重复"; return(fi); } //保存账套信息 MyOrganizationDAL.InsertOrganization(oe); //保存默认角色信息和角色操作 RoleEntity re = new RoleEntity(); re.CmstID = oe.CmstID; re.CsyID = 1; re.RoleName = "超级管理员"; re.IfUse = true; re = MyOrganizationDAL.InsertRoleEtity(re); re.Ros = MyOrganizationDAL.SelectAllOperationList(); foreach (var ro in re.Ros) { MyOrganizationDAL.InsertRoleOperate(re.RoleID, ro.OperationID, re.CmstID); } //保存账套主管信息(系统默认账号) OperatorEntity ope = new OperatorEntity(); ope.Account = oe.CmstSysAccount; string str = Encrypt.Encrypt_MD5("000000"); ope.Password = str; ope.OperatorName = "系统管理员"; ope.IfSysAccount = true; ope.RoleID = re.RoleID; ope.CmstID = oe.CmstID; ope.IfUse = true; ope.UpdateTime = DateTime.Now; if (MyOrganizationDAL.CheckedOperatorAccountRepeate(ope.Account, ope.OperatorID)) { fi.ErrorStatus = STATUS_ADAPTER.SAVE_FAILED; fi.Result = oe; fi.FeedbackMessage = "账套主管重复"; return(fi); } MyOrganizationDAL.InsertOperatorEntity(ope); scope.Complete(); } fi.Result = ""; fi.ErrorStatus = STATUS_ADAPTER.SAVE_SUCCESS; fi.FeedbackMessage = ""; return(fi); } catch (Exception ex) { fi.Result = ""; fi.ErrorStatus = STATUS_ADAPTER.SAVE_FAILED; fi.FeedbackMessage = ex.Message.ToString(); return(fi); } }