private bool ShowBZ_MxButton(out ButtonsModel model) { string str = base.Request["UpdatePK"]; string str2 = ((UserModel)HttpContext.Current.Session["User"]).Company.pk_corp; ((UserModel)HttpContext.Current.Session["User"]).Branch.BH.Trim(); bool isQianShou = false; model = new ButtonsModel(); if (str != null) { TB_QUOTA_Model isUpModel = new TB_QUOTA_Bll().GetIsUpModel(str); if (isUpModel.PD_QUOTA_ISUP == "1") { SMZJ.BLL.TB_QUOTA_DETAIL tb_quota_detail = new SMZJ.BLL.TB_QUOTA_DETAIL(); SMZJ.Model.TB_QUOTA_DETAIL tb_quota_detail2 = tb_quota_detail.GetSonServerPK_Model(str2, str); if (tb_quota_detail2 != null) { this.buttonTxt.Value = PublicDal.ShowBZ_MxButton_IsUP(this.Page, out model, tb_quota_detail2.PD_QUOTA_SERVERPK, isQianShou); model.IfSave = false; model.IfSetBack = false; model.IfRollBack = false; return isQianShou; } isQianShou = !tb_quota_detail.GetShiDFouJS_Model(str, 1); this.buttonTxt.Value = PublicDal.ShowBZ_MxButton_IsUP(this.Page, out model, isUpModel.PD_QUOTA_SERVERPK, isQianShou); if (!PublicDal.IsJGBM(((UserModel)this.Session["User"]).Branch.BH.Trim())) { model.IfSave = false; } if (model.IfSave) { } return isQianShou; } this.buttonTxt.Value = PublicDal.ShowMxButton(this.Page, out model, "TB_QUOTA", "PD_QUOTA_CODE", str, "PD_QUOTA_SERVERPK"); return isQianShou; } this.buttonTxt.Value = PublicDal.ShowMxButton(this.Page, out model, "TB_QUOTA", "PD_QUOTA_CODE", null, "PD_QUOTA_SERVERPK"); return isQianShou; }
public void SetBZ_ServiceStream(int operation, string PD_PROJECT_CODE, string Mess) { int num = 0; UserModel model = (UserModel)HttpContext.Current.Session["User"]; model.Branch.BH.Trim(); string str = model.Company.pk_corp; try { TB_QUOTA_Bll bll = new TB_QUOTA_Bll(); TB_QUOTA_Model isUpModel = bll.GetIsUpModel(PD_PROJECT_CODE); SMZJ.BLL.TB_QUOTA_DETAIL tb_quota_detail = new SMZJ.BLL.TB_QUOTA_DETAIL(); if (operation == 0) { if (isUpModel.PD_QUOTA_ISUP == "1") { if (!tb_quota_detail.GetShiDFouJS_Model(PD_PROJECT_CODE, 1)) { PageShowText.Refurbish("已有乡镇已签收,无法进行此操作!", this.Page); num = 0; return; } num = bll.UpdateIsXiaFa(PD_PROJECT_CODE, "0", "0", "0"); tb_quota_detail.UpdateSonServerPK(PD_PROJECT_CODE, "", "0", "0", "", ""); } this.SetServiceStream(operation, PD_PROJECT_CODE, Mess); num = 1; } else if (isUpModel.PD_QUOTA_ISUP == "1") { SMZJ.Model.TB_QUOTA_DETAIL tb_quota_detail2 = tb_quota_detail.GetSonServerPK_Model(str, PD_PROJECT_CODE); string newServerPK = ""; if (tb_quota_detail2 != null) { PublicDal.GetUpDownStream(this.Page, tb_quota_detail2.PD_QUOTA_SERVERPK, 2, out newServerPK); string iSRECEIVE = ""; string iSHUIZHI = ""; string rECEIVEMAN = ""; string hUIZHIMAN = ""; iSRECEIVE = "1"; iSHUIZHI = "1"; rECEIVEMAN = tb_quota_detail2.RECEIVE_MAN; hUIZHIMAN = model.UserName; if ((isUpModel.PD_QUOTA_IFXZHZ != null) && (isUpModel.PD_QUOTA_IFXZHZ.Trim() != "1")) { bll.UpdateIsXiaFa(PD_PROJECT_CODE, "1", "1", "1"); } if (tb_quota_detail.UpdateSonServerPK(PD_PROJECT_CODE, str, newServerPK, iSRECEIVE, iSHUIZHI, rECEIVEMAN, hUIZHIMAN)) { num = 1; newServerPK = ""; PublicDal.GetUpDownStream(this.Page, isUpModel.PD_QUOTA_SERVERPK, 1, out newServerPK); if (tb_quota_detail.IsHuiZhi(PD_PROJECT_CODE) && (newServerPK != isUpModel.PD_QUOTA_SERVERPK)) { this.SetServiceStream(1, PD_PROJECT_CODE, null); this.SetServiceStream(1, PD_PROJECT_CODE, null); } PageShowText.Refurbish(Mess + "成功", this.Page); } else { num = 0; PageShowText.Refurbish(Mess + "失败", this.Page); } } else { PageShowText.Refurbish(Mess + "签收失败,没有您需要签收的附件!", this.Page); } } else { this.SetServiceStream(operation, PD_PROJECT_CODE, Mess); num = 1; } } finally { if (num == 1) { this.UpdateLog(PD_PROJECT_CODE, Mess, "执行 " + Mess + " 成功", "", PD_PROJECT_CODE, "", ""); } else { this.UpdateLog(PD_PROJECT_CODE, Mess, "执行 " + Mess + " 失败", "", PD_PROJECT_CODE, "", ""); } } }