private void DataDelete(string strPK, string bh, string name, string company, string branch) { try { if (PublicDal.IsDelete(this.Page, "TB_QUOTA", "PD_QUOTA_CODE", strPK, "PD_QUOTA_SERVERPK")) { TB_QUOTA_Bll bll = new TB_QUOTA_Bll(); TB_QUOTA_DETAIL tb_quota_detail = new TB_QUOTA_DETAIL(); if (bll.Delete(strPK)) { tb_quota_detail.DeleteProject(strPK); PageShowText.ShowMessage("删除成功!", this.Page); } else { PageShowText.ShowMessage("删除失败!", this.Page); } if (this.Master.PageIndex > 1) { this.pageind = this.Master.PageIndex; } this.ShowData(this.Master.StrSelect); } else { PageShowText.ShowMessage("单据已进入业务流程,需删除请追回单据后再进行删除。", this.Page); } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "DataDelete()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("操作失败,请联系系统管理员!", this.Page); } }
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); } }
private void CreateData() { string strErr = ""; if (!this.PanDuan(ref strErr)) { this.hy_File(null, strErr); } else { TB_QUOTA_Model model = this.GetModel(null); model.PD_QUOTA_CODE = DateTime.Now.ToString("yyyyMMddhhmmssffffff"); TB_QUOTA_Bll bll = new TB_QUOTA_Bll(); if ((base.Request["CreatePK"] != null) && (base.Request["CreatePK"].Trim() != "")) { model.PD_QUOTA_PICI = bll.GetMaxPiCi(model.PD_QUOTA_ZBWH).ToString(); } UserModel model2 = (UserModel)this.Session["User"]; model.PD_QUOTA_SERVERPK = PublicDal.SetCreateServiceStream(this.Page); model.PD_QUOTA_INPUT_COMPANY = this.Session["pk_corp"].ToString(); model.PD_QUOTA_INPUT_MAN = model2.UserName; model.PD_QUOTA_INPUT_DEPART = model2.Branch.BH; model.PD_QUOTA_INPUT_DATE = new DateTime?(DateTime.Now); string wh = ((UserModel)this.Session["user"]).Company.Name.Substring(0, 1) + ((UserModel)this.Session["user"]).Branch.Name.Substring(0, 1); this.GetQUOTA(model); bll.Add(model, wh); string str3 = model.PD_QUOTA_CODE; SMZJ.BLL.TB_QUOTA_DETAIL tb_quota_detail = new SMZJ.BLL.TB_QUOTA_DETAIL(); List<SMZJ.Model.TB_QUOTA_DETAIL> qUOTAModel = this.GetQUOTAModel(model.PD_QUOTA_CODE); tb_quota_detail.DeleteProject(str3); tb_quota_detail.AddList(qUOTAModel); this.UpdateLog(str3, "新建指标", "执行 新建 成功", "", str3, "", ""); Const.DoSuccessNoClose("添加成功", this.Page.Request.Url.LocalPath + "?UpdatePK=" + model.PD_QUOTA_CODE, this.Page); } }
private void CreateData() { string strErr = ""; if (!this.PanDuan(ref strErr)) { this.hy_File(null, strErr); } else { TB_QUOTA_Model model = this.GetModel(); new TB_QUOTA_Bll().Add(model, ""); string str2 = model.PD_QUOTA_CODE; SMZJ.BLL.TB_QUOTA_DETAIL tb_quota_detail = new SMZJ.BLL.TB_QUOTA_DETAIL(); List<SMZJ.Model.TB_QUOTA_DETAIL> qUOTAModel = this.GetQUOTAModel(str2); tb_quota_detail.DeleteProject(str2); tb_quota_detail.AddList(qUOTAModel); PageShowText.Refurbish("添加成功", this.Page); } }