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