public void Buttons(string ibtid) { switch (ibtid) { case "ibtcontrol_ibtupdate": if ((base.Request["UpdatePK"] != null) && (base.Request["UpdatePK"].Trim() != "")) { this.UpdataData(base.Request["UpdatePK"].Trim()); } return; case "ibtcontrol_ibtdelete": if ((base.Request["UpdatePK"] != null) && (base.Request["UpdatePK"].Trim() != "")) { this.DelData(base.Request["UpdatePK"].Trim()); } return; case "ibtcontrol_ibtsave": if ((base.Request["UpdatePK"] == null) || !(base.Request["UpdatePK"].Trim() != "")) { this.CreateData(); return; } this.UpdataData(base.Request["UpdatePK"].Trim()); return; case "ibtcontrol_ibtdo": return; case "ibtcontrol_ibtaudit": { TB_QUOTA_Bll bll = new TB_QUOTA_Bll(); if (!PublicDal.PageValidate.IsDecimal(bll.GetModel(base.Request.Params["UpdatePK"]).PD_QUOTA_ZBXDZH)) { PageShowText.Refurbish("无分配方案,不允许下发!如输入了分配方案,请先保存!", this.Page); return; } this.UpdateXiaFaOld(1, base.Request.Params["UpdatePK"], this.buttonTxt.Value); return; } case "ibtcontrol_ibtapply": this.SetBZ_ServiceStream(1, base.Request.Params["UpdatePK"], this.buttonTxt.Value); return; case "ibtcontrol_ibtsetback": this.SetBZ_ServiceStream(0, base.Request.Params["UpdatePK"], "追回"); return; case "ibtcontrol_ibtrollback": this.SetBZ_ServiceStream(0, base.Request.Params["UpdatePK"], "退回"); return; case "ibtcontrol_ibtlook": PageShowText.OpenPage("/Work/PublicAspx/ShowLog.aspx?code=" + base.Request["UpdatePK"] + "&type=2", this.Page); return; case "ibtcontrol_ibtprintnote": PageShowText.Refurbish("", this.Page); PageShowText.OpenPage("ZPRINT.aspx?pk=" + base.Server.UrlEncode(base.Request.Params["UpdatePK"]), null, null, this.Page); return; } }
private void UpdataData(string PD_QUOTA_CODE) { string strErr = ""; if (!this.PanDuan(ref strErr)) { this.hy_File(null, strErr); } else { TB_QUOTA_Bll bll = new TB_QUOTA_Bll(); TB_QUOTA_Model model = new TB_QUOTA_Model(); model = bll.GetModel(PD_QUOTA_CODE); model = this.GetModel(model); model.PD_QUOTA_CODE = PD_QUOTA_CODE; this.GetQUOTA(model); bll.Update(model); SMZJ.BLL.TB_QUOTA_DETAIL tb_quota_detail = new SMZJ.BLL.TB_QUOTA_DETAIL(); List<SMZJ.Model.TB_QUOTA_DETAIL> qUOTAModel = this.GetQUOTAModel(PD_QUOTA_CODE); tb_quota_detail.DeleteProject(PD_QUOTA_CODE); tb_quota_detail.AddList(qUOTAModel); this.UpdateLog(PD_QUOTA_CODE, "修改指标", "执行 修改 成功", "", PD_QUOTA_CODE, "", ""); PageShowText.Refurbish("修改成功", this.Page); } }