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, "", ""); } } }
private void UpdateXiaFaOld(int operation, string PD_QUOTA_CODE, string Mess) { TB_QUOTA_Bll bll = new TB_QUOTA_Bll(); if (bll.UpdateIsXiaFa(PD_QUOTA_CODE, "1", "0", "0") > 0) { string str = this.SetServiceStream(operation, PD_QUOTA_CODE, Mess); SMZJ.BLL.TB_QUOTA_DETAIL tb_quota_detail = new SMZJ.BLL.TB_QUOTA_DETAIL(); if (tb_quota_detail.UpdateSonServerPK(PD_QUOTA_CODE, str, "0", "0", "", "")) { this.UpdateLog(PD_QUOTA_CODE, Mess, "执行 " + Mess + " 成功", "", PD_QUOTA_CODE, "", ""); } else { this.UpdateLog(PD_QUOTA_CODE, Mess, "执行 " + Mess + " 失败", "", PD_QUOTA_CODE, "", ""); } } else { PageShowText.Refurbish(Mess + "失败", this.Page); } }