Exemplo n.º 1
0
 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);
         }
     }
 }
Exemplo n.º 2
0
 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;
         }
     }
 }