private void ShowInfo(string PD_QUOTA_CODE) { if (!string.IsNullOrEmpty(PD_QUOTA_CODE)) { this.imgSearch.Attributes.Remove("onclick"); this.txtPD_QUOTA_ZBWH.Attributes.Remove("QiPao"); TB_QUOTA_Bll bll = new TB_QUOTA_Bll(); TB_QUOTA_Model modelByCODE = bll.GetModelByCODE(PD_QUOTA_CODE); if (modelByCODE != null) { this.lblAUTO_ID.Text = modelByCODE.AUTO_NO.ToString(); this.txtPD_QUOTA_NAME.Text = modelByCODE.PD_QUOTA_NAME; this.ddlPD_YEAR.SelectedValue = modelByCODE.PD_YEAR; this.txtPD_QUOTA_LWJG.SelectedValue = modelByCODE.PD_QUOTA_LWJG.ToString(); this.txtPD_QUOTA_LWJG_NAME.Text = modelByCODE.PD_QUOTA_LWJG_NAME.ToString(); this.ddlPD_QUOTA_IFUP.SelectedValue = modelByCODE.PD_QUOTA_IFUP; this.ddlPD_QUOTA_ZJXZ.SelectedValue = modelByCODE.PD_QUOTA_ZJXZ; this.txtPD_QUOTA_TARGET.Text = modelByCODE.PD_QUOTA_TARGET; this.txtPD_QUOTA_STANDARD.Text = modelByCODE.PD_QUOTA_STANDARD; this.txtPD_QUOTA_BASIS.Text = modelByCODE.PD_QUOTA_BASIS; this.txtPD_QUOTA_BASIS_JG.Text = modelByCODE.PD_QUOTA_BASIS_JG; if ((modelByCODE.PD_QUOTA_DEPART != null) && (modelByCODE.PD_QUOTA_DEPART.Trim().Length != 0)) { bool flag = true; foreach (ListItem item in this.ddlPD_QUOTA_DEPART.Items) { if (item.Value == modelByCODE.PD_QUOTA_DEPART) { flag = false; break; } } if (flag) { object branchName = PublicDal.GetBranchName(modelByCODE.PD_QUOTA_DEPART); if (branchName != null) { this.ddlPD_QUOTA_DEPART.Items.Add(new ListItem(branchName.ToString(), modelByCODE.PD_QUOTA_DEPART)); } else { this.ddlPD_QUOTA_DEPART.Items.Add(new ListItem("", modelByCODE.PD_QUOTA_DEPART)); } } } this.ddlPD_QUOTA_DEPART.SelectedValue = modelByCODE.PD_QUOTA_DEPART; this.txtPD_QUOTA_JGYQ.Text = modelByCODE.PD_QUOTA_JGYQ; this.ddlPD_PROJ_STATUS.SelectedValue = modelByCODE.PD_PROJ_STATUS; this.ddlPD_PROJ_LAST_AUDIT_STATUS.SelectedValue = modelByCODE.PD_PROJ_LAST_AUDIT_STATUS; this.ddlPD_IS_RETURN.SelectedValue = modelByCODE.PD_IS_RETURN.ToString(); this.ddlPD_ISOUT_QUOTA.SelectedValue = modelByCODE.PD_ISOUT_QUOTA.ToString(); this.txtPD_QUOTA_ZBWH.Text = modelByCODE.PD_QUOTA_ZBWH.ToString(); if (modelByCODE.PD_QUOTA_FWDATA.Year != 1) { this.txtPD_QUOTA_FWDATA.Text = modelByCODE.PD_QUOTA_FWDATA.ToString(); } this.txtPD_QUOTA_COMPANY.Text = modelByCODE.PD_QUOTA_COMPANY; this.txtPD_QUOTA_ZBYT.Text = modelByCODE.PD_QUOTA_ZBYT; this.hjj.Value = modelByCODE.PD_QUOTA_JJLX; this.hgl.Value = modelByCODE.PD_QUOTA_GLLX; this.txtPD_QUOTA_GLLX.Text = modelByCODE.PD_QUOTA_GLLX; this.txtPD_QUOTA_JJLX.Text = modelByCODE.PD_QUOTA_JJLX; this.ddlzjly.SelectedValue = modelByCODE.PD_QUOTA_ZJLY; this.ddlzgkj.SelectedValue = modelByCODE.PD_QUOTA_ZGKJ; this.txtPD_QUOTA_ZGBM.Text = modelByCODE.PD_QUOTA_ZGBM; if ((((UserModel)this.Session["User"]).Company.pk_corp.Trim() == modelByCODE.PD_QUOTA_INPUT_COMPANY.Trim()) || PublicDal.IsJGBM(((UserModel)this.Session["User"]).Branch.BH.Trim())) { this.txtPD_QUOTA_ZBXDZH.Text = modelByCODE.PD_QUOTA_ZBXDZH; this.txtPD_QUOTA_MONEY_TOTAL.Text = modelByCODE.PD_QUOTA_MONEY_TOTAL.ToString(); this.tr_wjzl.Visible = true; } else { this.lbl_MONEY.Text = "*****"; this.txtPD_QUOTA_ZBXDZH.Text = "*****"; this.txtPD_QUOTA_MONEY_TOTAL.Text = "*****"; object obj3 = bll.tFileIsShow(PublicDal.getURL(this.Page), this.tr_wjzl.ID); if ((obj3 != null) && (int.Parse(obj3.ToString()) == 1)) { this.tr_wjzl.Visible = true; } else { this.tr_wjzl.Visible = false; } } this.txtPD_QUOTA_ZGBM.Text = modelByCODE.PD_QUOTA_ZGBM; if ((base.Request["CreatePK"] != null) && (base.Request["CreatePK"].Trim() != "")) { this.Bind1(PD_QUOTA_CODE, modelByCODE, true); this.txtPD_QUOTA_ZBXDZH.Text = "0.00"; this.txtPD_QUOTA_ZBWH.Enabled = false; this.txtPD_QUOTA_NAME.Enabled = false; this.txtPD_QUOTA_MONEY_TOTAL.Enabled = false; this.lblPD_QUOTA_PICI.Text = "第 " + (int.Parse(modelByCODE.PD_QUOTA_PICI) + 1) + " 批"; this.lbl_MONEY.Text = modelByCODE.PD_JY_MONEY; this.PD_QUOTA_PICI.Value = (int.Parse(modelByCODE.PD_QUOTA_PICI) + 1).ToString(); } else { this.txtPD_QUOTA_CODE.Value = modelByCODE.PD_QUOTA_CODE; this.Bind1(PD_QUOTA_CODE, modelByCODE, false); if (PublicDal.PageValidate.IsInt(modelByCODE.PD_QUOTA_PICI) && (int.Parse(modelByCODE.PD_QUOTA_PICI) > 1)) { this.txtPD_QUOTA_ZBWH.Enabled = false; this.txtPD_QUOTA_NAME.Enabled = false; this.txtPD_QUOTA_MONEY_TOTAL.Enabled = false; } this.lblPD_QUOTA_PICI.Text = "第 " + modelByCODE.PD_QUOTA_PICI.Trim() + " 批"; if (!PublicDal.PageValidate.IsDecimal(modelByCODE.PD_JY_MONEY)) { modelByCODE.PD_JY_MONEY = "0.00"; } if (!PublicDal.PageValidate.IsDecimal(modelByCODE.PD_QUOTA_ZBXDZH)) { modelByCODE.PD_QUOTA_ZBXDZH = "0.00"; } if (this.lbl_MONEY.Text != "*****") { this.lbl_MONEY.Text = (decimal.Parse(modelByCODE.PD_JY_MONEY) + decimal.Parse(modelByCODE.PD_QUOTA_ZBXDZH)).ToString(); } this.PD_QUOTA_PICI.Value = modelByCODE.PD_QUOTA_PICI; } this.ddlPD_YEAR.SelectedValue = modelByCODE.PD_YEAR.Trim(); this.ddlPD_QUOTA_ZJXZ.SelectedValue = modelByCODE.PD_QUOTA_ZJXZ.Trim(); this.ddlPD_QUOTA_IFUP.SelectedValue = modelByCODE.PD_QUOTA_IFUP.Trim(); this.ddlPD_QUOTA_YSLX.SelectedValue = modelByCODE.PD_QUOTA_YSLX; this.serverPK.Value = modelByCODE.PD_QUOTA_SERVERPK; } } }
protected void Page_Load(object sender, EventArgs e) { this.Master.LBTitle = "乡镇财政资金监管信息系统 - 系统配置"; if (base.Request["strTitle"] != null) { this.txttitle.Value = base.Server.UrlDecode(base.Request["strTitle"].ToString().Trim()); } this.Master.strTitle = this.txttitle.Value; this.Master.ButtonsPushDown = new ButtonsHandler(this.Buttons); if (!this.Page.IsPostBack) { if (this.Session["User"] == null) { Const.GoLoginPath_Open(this.Page); } else { string userName = ((UserModel)this.Session["User"]).UserName; string power = ((UserModel)this.Session["User"]).Power; string companyPower = ((UserModel)this.Session["User"]).CompanyPower; ButtonsModel model = new ButtonsModel(userName); if (PowerClass.IfHasPower(userName, power, PowerNum.SystemSet)) { model.IfSave = true; model.IfAdd = false; model.IfUpdate = false; model.IfDelete = false; model.IfLook = false; model.IfSearch = false; model.IfRefresh = true; model.IfHuiZong = false; model.IfPutOut = false; model.IfSet = false; model.IfExit = true; this.Master.btModel = model; try { try { this.dbo = new DB_OPT(); this.dbo.Open(); this.cfd = new ConfigurationDal(); ConfigurationModel model2 = this.cfd.GetModel(this.dbo); if (model2 != null) { this.txtMenuNodeName.Text = model2.MENUNODENAME.ToString(); this.txtMenuNodeValue.Text = model2.MENUNODEVALUE.ToString(); this.txtPageSizeOne.Text = model2.PAGESIZEONE.ToString(); this.txtPageSizeTwo.Text = model2.PAGESIZETWO.ToString(); this.txtServiceName.Text = model2.SERVICENAME.ToString(); this.txtUserName.Text = model2.USERNAME.ToString(); this.txtServiceIP.Text = model2.SERVICEIP.ToString(); this.FileErrMessPath.Text = model2.ErrMessPath.ToString(); this.rbtifOpenExceptionLog.SelectedValue = model2.IFOPENEXCEPTIONLOG.ToString(); this.rbtifOpenOpLog.SelectedValue = model2.IFOPENOPLOG.ToString(); TB_QUOTA_Bll bll = new TB_QUOTA_Bll(); this.db_quota_fileIsShow.SelectedValue = bll.tFileIsShow("ZBOper.aspx", "tr_wjzl").ToString(); } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "Page_Load()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage(" 获取数据失败,请联系管理员!", this.Page); } return; } finally { if (this.dbo != null) { this.dbo.Close(); } } } Const.SorryForPower(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 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 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; } }
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 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 BindList() { DataSet list = new TB_QUOTA_Bll().GetList(""); if ((list != null) && (list.Tables.Count > 0)) { this.gvResult.DataSource = list.Tables[0]; this.gvResult.DataBind(); } }
private void ShowData(DateTime start, DateTime end, string databaseName) { DataSet set = new TB_QUOTA_Bll().GetInputData(start, end, databaseName, base.Server.MapPath("~/") + @"bin\CreateTriZB_MXZB_to_SoMeTech.sql"); if (set != null) { if (this.gvResult.Columns.Count <= 1) { for (int i = 0; i < set.Tables[0].Columns.Count; i++) { BoundField field = new BoundField { DataField = set.Tables[0].Columns[i].ColumnName, HeaderText = set.Tables[0].Columns[i].ColumnName, SortExpression = set.Tables[0].Columns[i].ColumnName }; field.ItemStyle.HorizontalAlign = HorizontalAlign.Center; this.gvResult.Columns.Add(field); } } this.gvResult.DataSource = set; this.gvResult.DataBind(); } else { PageShowText.Run_javascript("bind();ShowLoading('此帐套第一次做导入,正在初始化!切勿关闭窗口,请耐心等待!!')", this.Page); } }
private bool ZhiBiaoInPut() { if (this.gvResult.Rows.Count > 0) { TB_QUOTA_Bll bll = new TB_QUOTA_Bll(); List<TB_QUOTA_Model> modelList = new List<TB_QUOTA_Model>(); UserModel model = (UserModel)this.Session["User"]; string userName = model.UserName; string str2 = model.Company.pk_corp; string bH = model.Branch.BH; DateTime now = DateTime.Now; string databaseName = this.hiddDatabase.Value; PublicDal.SetCreateServiceStream(this.Page, "ZBOper.aspx"); foreach (GridViewRow row in this.gvResult.Rows) { if (((CheckBox)row.Cells[0].FindControl("checkbox1")).Checked) { TB_QUOTA_Model item = new TB_QUOTA_Model { PD_QUOTA_CODE = DateTime.Now.ToString("yyyyMMddhhmmssffffff") }; if (PublicDal.PageValidate.IsDateTime(row.Cells[1].Text)) { item.PD_QUOTA_FWDATA = DateTime.Parse(row.Cells[1].Text); } item.PD_QUOTA_ZBWH = row.Cells[2].Text; item.PD_QUOTA_NAME = row.Cells[3].Text; item.PD_YEAR = row.Cells[4].Text; item.PD_QUOTA_ZJXZ = row.Cells[5].Text; if (PublicDal.PageValidate.IsDecimal(row.Cells[6].Text)) { item.PD_QUOTA_MONEY_TOTAL = decimal.Parse(row.Cells[6].Text); } item.PD_QUOTA_ZBXDZH = row.Cells[7].Text; item.PD_QUOTA_ZBYT = row.Cells[8].Text; item.PD_QUOTA_GLLX = row.Cells[9].Text; item.PD_QUOTA_JJLX = row.Cells[10].Text; item.PD_QUOTA_INPUT_MAN = userName; item.PD_QUOTA_INPUT_COMPANY = str2; item.PD_QUOTA_INPUT_DATE = new DateTime?(now); item.PD_QUOTA_INPUT_DEPART = bH; modelList.Add(item); } } if (modelList.Count > 0) { bll.AddList(modelList, databaseName); this.JS_BindShow("导入成功!"); return true; } this.JS_BindShow("请选择一行数据进行导入!"); } else { this.JS_BindShow("请先查询数据!"); } return false; }
private void ShowInfo(string PD_QUOTA_CODE) { if (!string.IsNullOrEmpty(PD_QUOTA_CODE)) { TB_QUOTA_Bll bll = new TB_QUOTA_Bll(); if (bll.GetList(" PD_QUOTA_CODE='" + PD_QUOTA_CODE + "'") != null) { TB_QUOTA_Model modelByCODE = bll.GetModelByCODE(PD_QUOTA_CODE); this.txtPD_QUOTA_CODE.Enabled = false; this.lblAUTO_ID.Text = modelByCODE.AUTO_NO.ToString(); this.txtPD_QUOTA_CODE.Text = modelByCODE.PD_QUOTA_CODE; this.txtPD_QUOTA_NAME.Text = modelByCODE.PD_QUOTA_NAME; this.ddlPD_YEAR.SelectedValue = modelByCODE.PD_YEAR; this.txtPD_QUOTA_LWJG.Text = modelByCODE.PD_QUOTA_LWJG.ToString(); this.txtPD_QUOTA_LWJG_NAME.Text = modelByCODE.PD_QUOTA_LWJG_NAME.ToString(); this.ddlPD_QUOTA_IFUP.SelectedValue = modelByCODE.PD_QUOTA_IFUP; this.ddlPD_QUOTA_ZJXZ.Text = modelByCODE.PD_QUOTA_ZJXZ; this.txtPD_QUOTA_TARGET.Text = modelByCODE.PD_QUOTA_TARGET; this.txtPD_QUOTA_STANDARD.Text = modelByCODE.PD_QUOTA_STANDARD; this.txtPD_QUOTA_BASIS.Text = modelByCODE.PD_QUOTA_BASIS; this.ddlPD_QUOTA_IFXZQS.SelectedValue = modelByCODE.PD_QUOTA_IFXZQS.ToString(); this.ddlPD_QUOTA_IFPASS.SelectedValue = modelByCODE.PD_QUOTA_IFPASS; this.txtPD_QUOTA_BASIS_JG.Text = modelByCODE.PD_QUOTA_BASIS_JG; this.txtPD_QUOTA_INPUT_MAN.Text = modelByCODE.PD_QUOTA_INPUT_MAN; this.txtPD_QUOTA_PASS_DATE.Text = modelByCODE.PD_QUOTA_PASS_DATE.ToString(); this.txtPD_QUOTA_ACCEPT_MAN.Text = modelByCODE.PD_QUOTA_ACCEPT_MAN; this.txtPD_QUOTA_PASS_MAN.Text = modelByCODE.PD_QUOTA_PASS_MAN; this.ddlPD_QUOTA_ACCEPT_COMPANY.SelectedValue = modelByCODE.PD_QUOTA_ACCEPT_COMPANY; this.txtPD_QUOTA_ACCEPT_DATE.Text = modelByCODE.PD_QUOTA_ACCEPT_DATE.ToString(); this.ddlPD_QUOTA_IFLLYQS.SelectedValue = modelByCODE.PD_QUOTA_IFLLYQS.ToString(); this.ddlPD_QUOTA_XZ_ACCEPT_COMPANY.SelectedValue = modelByCODE.PD_QUOTA_XZ_ACCEPT_COMPANY; this.txtPD_QUOTA_XZ_ACCEPT_DATE.Text = modelByCODE.PD_QUOTA_XZ_ACCEPT_DATE.ToString(); this.txtPD_QUOTA_MONEY_TOTAL.Text = modelByCODE.PD_QUOTA_MONEY_TOTAL.ToString(); this.ddlPD_QUOTA_DEPART.SelectedValue = modelByCODE.PD_QUOTA_DEPART; this.txtPD_QUOTA_JGYQ.Text = modelByCODE.PD_QUOTA_JGYQ; this.txtPD_QUOTA_INPUT_DATE.Text = modelByCODE.PD_QUOTA_INPUT_DATE.ToString(); this.ddlPD_QUOTA_INPUT_COMPANY.SelectedValue = modelByCODE.PD_QUOTA_INPUT_COMPANY; this.txtPD_QUOTA_XZ_ACCEPT_MAN.Text = modelByCODE.PD_QUOTA_XZ_ACCEPT_MAN; this.ddlPD_PROJ_STATUS.SelectedValue = modelByCODE.PD_PROJ_STATUS; this.ddlPD_PROJ_LAST_AUDIT_STATUS.SelectedValue = modelByCODE.PD_PROJ_LAST_AUDIT_STATUS; this.ddlPD_IS_RETURN.SelectedValue = modelByCODE.PD_IS_RETURN.ToString(); this.ddlPD_ISOUT_QUOTA.SelectedValue = modelByCODE.PD_ISOUT_QUOTA.ToString(); this.Bind1(PD_QUOTA_CODE, modelByCODE); } } }
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": { TB_QUOTA_Bll bll = new TB_QUOTA_Bll(); if (bll.SetZbState(base.Request["UpdatePK"].Trim()) > 0) { PageShowText.Refurbish("下发成功", this.Page); } return; } case "ibtcontrol_ibtrefresh": case "ibtcontrol_ibtaudit": case "ibtcontrol_ibtsetback": case "ibtcontrol_ibtrollback": return; } }
protected void Page_Load(object sender, EventArgs e) { if (this.Session["User"] != null) { UserModel model = (UserModel)this.Session["User"]; string isHasBaby = model.Company.IsHasBaby; string isJGBM = model.Branch.IsJGBM; VelocityEngine engine = new VelocityEngine(); ExtendedProperties p = new ExtendedProperties(); p.AddProperty("file.resource.loader.path", base.Server.MapPath("Templete")); p.SetProperty("input.encoding", "utf-8"); p.SetProperty("output.encoding", "utf-8"); engine.Init(p); Template template = engine.GetTemplate("0.vm", "utf-8"); DataTable table = null; string str3 = "0"; string str4 = ""; string sQLString = ""; string str6 = ""; if (base.Request.Params["yl"] != null) { string str7 = base.Server.UrlDecode(base.Request.Params["pk"]).Replace("'", ""); str6 = DbHelperOra.GetSingle("select t.systemusername from DB_CONFIGURATION t").ToString(); TB_QUOTA_Model model2 = new TB_QUOTA_Bll().GetModel(base.Request.Params["pk"]); if (base.Request.Params["yl"] == "1") { sQLString = "select * from v_mes_gs where pd_quota_code in (" + str7 + ")"; if (model2.PD_QUOTA_IFPASS != "1") { str4 = "此指标没有传递,不能打印“业务股室告知乡财”告知书"; } else { template = engine.GetTemplate("1.vm", "utf-8"); } } else if (base.Request.Params["yl"] == "2") { sQLString = "select * from v_mes_gs_2 where pd_quota_code in (" + str7 + ")"; string str8 = ((UserModel)this.Session["User"]).Company.pk_corp; if (str8.Trim() != model2.PD_QUOTA_INPUT_COMPANY.Trim()) { sQLString = sQLString + " and COMPANY_CODE='" + str8 + "'"; } if (model2.PD_QUOTA_ISUP != "1") { str4 = "此指标没有下发,不能打印“乡财告知乡镇”告知书"; } else { template = engine.GetTemplate("2.vm", "utf-8"); } } else if (base.Request.Params["yl"] == "3") { string name = "3.vm"; if (DbHelperOra.Exists("select count(*) from tb_quota where pd_quota_code in (" + str7 + ") and PD_QUOTA_ZJXZ='01'")) { sQLString = "select * from v_mes_gs_4 where pd_quota_code in (" + str7 + ")"; name = "4.vm"; } else { sQLString = "select * from v_mes_gs_3 where pd_quota_code in (" + str7 + ")"; } SMZJ.BLL.TB_QUOTA_DETAIL tb_quota_detail = new SMZJ.BLL.TB_QUOTA_DETAIL(); string strWhere = " PD_QUOTA_CODE='" + base.Request.Params["pk"] + "' and IF_SHOW=1 "; string str11 = ((UserModel)this.Session["User"]).Company.pk_corp; if (str11.Trim() != model2.PD_QUOTA_INPUT_COMPANY.Trim()) { strWhere = strWhere + " and COMPANY_CODE='" + str11 + "'"; sQLString = sQLString + " and COMPANY_CODE='" + str11 + "'"; } DataSet list = tb_quota_detail.GetList(strWhere); if ((list.Tables[0].Rows[0]["ishuizhi"].ToString().Trim() != "是") && (list.Tables[0].Rows[0]["ishuizhi"].ToString().Trim() != "1")) { str4 = "此指标没有回执,不能打印“乡镇回执乡财”告知书"; } else { template = engine.GetTemplate(name, "utf-8"); } } else { str4 = "内部错误,请重新登录"; } if (str4 == "") { table = DbHelperOra.Query(sQLString).Tables[0]; str3 = "1"; } } VelocityContext context = new VelocityContext(); context.Put("XiangZhen", str6); context.Put("xzs", table); context.Put("isnew", str3); context.Put("isHasBaby", isHasBaby.Trim()); context.Put("IsJGBM", isJGBM.Trim()); context.Put("DataPK", base.Request.Params["pk"]); context.Put("PrintTxt", str4); context.Put("rc", ((table == null) || (table.Rows.Count == 0)) ? "0" : table.Rows.Count.ToString()); template.Merge(context, base.Response.Output); } }
private void BindList() { TB_QUOTA_Bll bll = new TB_QUOTA_Bll(); string str = this.Session["pk_corp"].ToString(); DataSet list = bll.GetList("(trim(COMPANY_CODE)='" + str + "' or trim(PD_QUOTA_INPUT_COMPANY)='" + str + "')"); if ((list != null) && (list.Tables.Count > 0)) { this.gvResult.DataSource = list.Tables[0]; this.gvResult.DataBind(); } }
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); } }
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); } }
public void ShowData(string str) { try { string companyWhereZB = PublicDal.GetCompanyWhereZB(); DataSet list = new TB_QUOTA_Bll().GetList(" 1=1 " + companyWhereZB); if ((list != null) && (list.Tables[0].Rows.Count > 0)) { DataView defaultView = list.Tables[0].DefaultView; if ((this.ViewState["SortOrder"] != null) && (this.ViewState["OrderDire"] != null)) { string str3 = ((string)this.ViewState["SortOrder"]) + " " + ((string)this.ViewState["OrderDire"]); defaultView.Sort = str3; } this.gvResult.DataSource = defaultView; this.gvResult.DataBind(); } else { DataTable table = new DataTable(); table = list.Tables[0]; DataRow row = table.NewRow(); table.Rows.Add(row); this.gvResult.DataSource = table.DefaultView; this.gvResult.DataBind(); } PublicDal.setGridKeepAll(this.gvResult); } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "ShowData()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("获取数据失败,请联系系统管理员!", this.Page); } if (!this.Page.IsPostBack) { this.Master.PageIndex = 1; } }