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); } }