private void GetDeptName(string strDeptCode) { DeptManageDb deptManageDb = new DeptManageDb(); DataTable deptmentDetail = deptManageDb.GetDeptmentDetail(Convert.ToInt32(strDeptCode.Trim())); if (deptmentDetail.Rows.Count > 0) { this.LabDept.Text = deptmentDetail.Rows[0]["v_bmqc"].ToString() + "职务列表:"; } }
protected void Page_Load(object sender, EventArgs e) { this.WarnBlock.InnerHtml = ""; string text = ""; try { text = base.Request.QueryString["bmdm"].Trim(); } catch (Exception) { } if (text.Length != 0) { this.HdnDeptCode.Value = text; if (!base.IsPostBack) { this.hfldbtnadd.Value = "0"; DeptManageDb deptManageDb = new DeptManageDb(); deptManageDb.ObjPage = this.Page; DataTable deptmentDetail = deptManageDb.GetDeptmentDetail(Convert.ToInt32(text.Trim())); if (deptmentDetail.Rows.Count > 0) { this.LabDept.Text = deptmentDetail.Rows[0]["v_bmmc"].ToString(); this.HdnLevel.Value = deptmentDetail.Rows[0]["i_jb"].ToString(); } DataTable dataTable = deptManageDb.Getjb(Convert.ToInt32(text.Trim())); if (Convert.ToInt32(dataTable.Rows[0]["i_jb"]) != 1) { this.ddl.Visible = false; this.td1.Visible = false; this.td2.Visible = false; this.TBoxDeptName.Columns = 24; this.TBoxNumber.Columns = 6; } this.DGrdSubDept_DataBind(); this.DDLtAllDept_DataBind(); this.dropdownlistBind(); if (Convert.ToInt32(base.Request.QueryString["bmdm"].Trim()) == 1) { this.BtnMove.Visible = false; this.BtnMerge.Visible = false; return; } this.BtnMove.Visible = true; this.BtnMerge.Visible = true; } } }
protected void Page_Load(object sender, EventArgs e) { this.Label1.Text = "请填写用户信息"; if (!this.Page.IsPostBack) { if (base.Request["id"] != null) { this.hdnTempDeptCode.Value = base.Request.QueryString["id"].ToString(); } if (this.hdnTempDeptCode.Value != "") { DeptManageDb deptManageDb = new DeptManageDb(); DataTable deptmentDetail = deptManageDb.GetDeptmentDetail(Convert.ToInt32(this.hdnTempDeptCode.Value)); this.hdnTempDeptName.Value = deptmentDetail.Rows[0]["v_bmmc"].ToString(); this.txtDept.Text = this.hdnTempDeptName.Value; } this.jsBindate(); } }
protected void Page_Load(object sender, EventArgs e) { this.ald = new AddressListDb(); if (!this.Page.IsPostBack) { if (base.Request.QueryString["Op"].ToString() != "Browse") { if (base.Request.QueryString["Op"].ToString() == "Add") { this.lblTitle.Text = "增加联系人"; int num = this.ald.cGetDeptMaxSerial(Convert.ToInt32(base.Request.QueryString["iDept"].ToString())) + 1; this.tbSerial.Text = num.ToString(); string text = base.Request.QueryString["iDept"].ToString(); DeptManageDb deptManageDb = new DeptManageDb(); DataTable deptmentDetail = deptManageDb.GetDeptmentDetail(Convert.ToInt32(text)); ListItem item = new ListItem("返回上一级", deptmentDetail.Rows[0]["i_sjdm"].ToString()); DataTable allSameLevelDept = deptManageDb.GetAllSameLevelDept(Convert.ToInt32(text)); this.ddlDept.DataSource = allSameLevelDept; this.ddlDept.DataTextField = "v_bmmc"; this.ddlDept.DataValueField = "i_bmdm"; this.ddlDept.DataBind(); this.ddlDept.SelectedValue = text; if (Convert.ToInt32(allSameLevelDept.Rows[0]["i_sjdm"].ToString()) != 0) { this.ddlDept.Items.Insert(allSameLevelDept.Rows.Count, item); return; } } else { if (base.Request.QueryString["Op"].ToString() == "Mod") { this.lblTitle.Text = "修改联系人"; DataTable dataTable = this.ald.cGetLinkman(base.Request.QueryString["id"].ToString()); this.tbName.Text = dataTable.Rows[0]["v_xm"].ToString(); if (dataTable.Rows[0]["c_xb"].ToString() != "") { this.rblSex.SelectedValue = dataTable.Rows[0]["c_xb"].ToString(); } this.tbDuty.Text = dataTable.Rows[0]["v_zw"].ToString(); this.tbAddress.Text = dataTable.Rows[0]["v_jtzz"].ToString(); this.tbPostalcode.Text = dataTable.Rows[0]["v_yzbm"].ToString(); this.tbCorpPhone.Text = dataTable.Rows[0]["v_bgdh"].ToString(); this.tbFax.Text = dataTable.Rows[0]["v_cz"].ToString(); this.tbHomePhone.Text = dataTable.Rows[0]["v_zzdh"].ToString(); this.cbZdbs.Checked = (dataTable.Rows[0]["c_zdbs"].ToString() == "y"); this.tbHandset.Text = dataTable.Rows[0]["v_sj"].ToString(); this.cbSjbs.Checked = (dataTable.Rows[0]["c_sjbs"].ToString() == "y"); this.tbEmail.Text = dataTable.Rows[0]["v_dzyx"].ToString(); this.tbQQ.Text = dataTable.Rows[0]["v_wlch"].ToString(); this.tbContent.Text = dataTable.Rows[0]["v_bz"].ToString(); this.tbSerial.Text = dataTable.Rows[0]["i_xh"].ToString(); this.hdnSerial.Value = dataTable.Rows[0]["i_xh"].ToString(); this.hdnDept.Value = dataTable.Rows[0]["i_bmdm"].ToString(); string text2 = this.hdnDept.Value.ToString(); DeptManageDb deptManageDb2 = new DeptManageDb(); DataTable deptmentDetail2 = deptManageDb2.GetDeptmentDetail(Convert.ToInt32(text2)); ListItem item2 = new ListItem("返回上一级", deptmentDetail2.Rows[0]["i_sjdm"].ToString()); DataTable allSameLevelDept2 = deptManageDb2.GetAllSameLevelDept(Convert.ToInt32(text2)); this.ddlDept.DataSource = allSameLevelDept2; this.ddlDept.DataTextField = "v_bmmc"; this.ddlDept.DataValueField = "i_bmdm"; this.ddlDept.DataBind(); this.ddlDept.SelectedValue = text2; if (Convert.ToInt32(allSameLevelDept2.Rows[0]["i_sjdm"].ToString()) != 0) { this.ddlDept.Items.Insert(allSameLevelDept2.Rows.Count, item2); return; } } } } else { this.btnClose.Visible = false; this.btnConfirm.Visible = false; this.tbName.Visible = false; this.rblSex.Visible = false; this.ddlDept.Visible = false; this.tbDuty.Visible = false; this.tbAddress.Visible = false; this.tbPostalcode.Visible = false; this.tbCorpPhone.Visible = false; this.tbFax.Visible = false; this.tbHomePhone.Visible = false; this.cbZdbs.Visible = false; this.tbHandset.Visible = false; this.cbSjbs.Visible = false; this.tbEmail.Visible = false; this.tbQQ.Visible = false; this.tbContent.Visible = false; DataTable dataTable2 = this.ald.cGetLinkman(base.Request.QueryString["id"].ToString()); this.Table1.Rows[1].Cells[1].InnerText = dataTable2.Rows[0]["v_xm"].ToString(); this.Table1.Rows[2].Cells[1].InnerText = ((dataTable2.Rows[0]["c_xb"].ToString() == "f") ? "女" : "男"); this.Table1.Rows[3].Cells[1].InnerText = this.ald.depName(dataTable2.Rows[0]["i_bmdm"].ToString()); this.Table1.Rows[4].Cells[1].InnerText = dataTable2.Rows[0]["i_xh"].ToString(); this.Table1.Rows[5].Cells[1].InnerText = dataTable2.Rows[0]["v_zw"].ToString(); this.Table1.Rows[6].Cells[1].InnerText = dataTable2.Rows[0]["v_jtzz"].ToString(); this.Table1.Rows[7].Cells[1].InnerText = dataTable2.Rows[0]["v_yzbm"].ToString(); this.Table1.Rows[8].Cells[1].InnerText = dataTable2.Rows[0]["v_bgdh"].ToString(); this.Table1.Rows[9].Cells[1].InnerText = dataTable2.Rows[0]["v_cz"].ToString(); this.Table1.Rows[10].Cells[1].InnerText = ((dataTable2.Rows[0]["c_zdbs"].ToString() == "n") ? dataTable2.Rows[0]["v_zzdh"].ToString() : "-"); this.Table1.Rows[11].Cells[1].InnerText = ((dataTable2.Rows[0]["c_sjbs"].ToString() == "n") ? dataTable2.Rows[0]["v_sj"].ToString() : "-"); this.Table1.Rows[12].Cells[1].InnerText = dataTable2.Rows[0]["v_dzyx"].ToString(); this.Table1.Rows[13].Cells[1].InnerText = dataTable2.Rows[0]["v_wlch"].ToString(); this.Table1.Rows[14].Cells[1].InnerText = dataTable2.Rows[0]["v_bz"].ToString(); this.lblTitle.Text = dataTable2.Rows[0]["v_xm"].ToString() + "的详细信息"; } } }