Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.ald = new AddressListDb();
     if (!this.Page.IsPostBack)
     {
         if (base.Request.QueryString["iClient"] == null)
         {
             this.lblTitle.Text = "最近增加的联系人";
             DataTable dataSource = this.ald.eLastLinkmanQuary(15);
             this.dgLinkman.DataSource = dataSource;
             this.dgLinkman.DataBind();
             return;
         }
         string text = base.Request.QueryString["iClient"].ToString();
         this.lblTitle.Text  = base.Request.QueryString["strClientName"].ToString() + " 下的联系人";
         this.Panel1.Visible = true;
         DataTable dataTable = this.ald.eGetCorpInfo(text);
         this.lblAddress.Text    = dataTable.Rows[0]["v_dz"].ToString();
         this.lblPostalCode.Text = dataTable.Rows[0]["v_yb"].ToString();
         DataTable dataSource2 = this.ald.eGetCorpLinkman(text);
         this.dgLinkman.DataSource = dataSource2;
         this.dgLinkman.DataBind();
         this._iCorpCode = text;
     }
 }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.ald = new AddressListDb();
     if (!this.Page.IsPostBack)
     {
         this.lblTitle.Text = "设 置 用 户 资 料";
         DataRow dataRow = this.ald.cGetLinkmanDetail(this.Page.Session["yhdm"].ToString());
         if (dataRow != null)
         {
             if (dataRow["c_xb"].ToString() != "")
             {
                 this.rblSex.SelectedValue = dataRow["c_xb"].ToString();
             }
             this.tbDuty.Text       = dataRow["v_zw"].ToString();
             this.tbAddress.Text    = dataRow["v_jtzz"].ToString();
             this.tbPostalcode.Text = dataRow["v_yzbm"].ToString();
             this.tbCorpPhone.Text  = dataRow["v_bgdh"].ToString();
             this.tbFax.Text        = dataRow["v_cz"].ToString();
             this.tbHomePhone.Text  = dataRow["v_zzdh"].ToString();
             this.cbZdbs.Checked    = (dataRow["c_zdbs"].ToString() == "y");
             this.tbHandset.Text    = dataRow["v_sj"].ToString();
             this.cbSjbs.Checked    = (dataRow["c_sjbs"].ToString() == "y");
             this.tbEmail.Text      = dataRow["v_dzyx"].ToString();
             this.tbQQ.Text         = dataRow["v_wlch"].ToString();
             this.tbContent.Text    = dataRow["v_bz"].ToString();
         }
     }
 }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.ald = new AddressListDb();
     if (!this.Page.IsPostBack)
     {
         this.Session["HumanCode"] = "";
         this.Session["HumanName"] = "";
         if (this.Page.Request.Params["code"] == null)
         {
             DataSet   subDepartment = this.ald.getSubDepartment(1);
             DataTable dataTable     = subDepartment.Tables[0];
             if (dataTable.Rows.Count == 0)
             {
                 this._DeptCode = "1";
             }
             else
             {
                 this._DeptCode = dataTable.Rows[0]["i_bmdm"].ToString();
             }
         }
         else
         {
             if (this.Page.Request.Params["code"] != null)
             {
                 this._DeptCode = this.Page.Request.Params["code"].ToString();
             }
         }
         this.hdnDept.Value = this._DeptCode;
         this.BindDepInfo();
         this.btnDel.Attributes["onclick"] = "javascript:if(!confirm('真的要删除选定记录吗?')){return false;}";
     }
 }
Ejemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.strTarget      = "LinkmanList";
     this.blnEnabledLink = true;
     this.myAddress      = new AddressListDb();
     if (!this.Page.IsPostBack)
     {
         DeptManageDb deptManageDb = new DeptManageDb();
         deptManageDb.GetTopDepartmentSet();
         this.Tree_Bind();
     }
 }
Ejemplo n.º 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         TreeNode treeNode = new TreeNode();
         treeNode.Text = "个人通讯录";
         this.tvGroup.Nodes.Add(treeNode);
         AddressListDb addressListDb = new AddressListDb();
         DataTable     dataTable     = addressListDb.pGetGroup(this.Page.Session["yhdm"].ToString());
         foreach (DataRow dataRow in dataTable.Rows)
         {
             TreeNode treeNode2 = new TreeNode();
             treeNode2.Text        = dataRow["v_fzmc"].ToString();
             treeNode2.Target      = "linkman";
             treeNode2.NavigateUrl = "LinkmanList.aspx?iGroup=" + dataRow["i_id"].ToString() + "&strGroupName=" + dataRow["v_fzmc"].ToString();
             treeNode.ChildNodes.Add(treeNode2);
         }
     }
 }
Ejemplo n.º 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.myAddress = new AddressListDb();
     if (!this.Page.IsPostBack)
     {
         base.Response.Cache.SetNoStore();
         LinkmanSearch.isbtnout = false;
         if (this.Page.Request.Params["code"] == null)
         {
             DataSet   subDepartment = this.myAddress.getSubDepartment(1);
             DataTable dataTable     = subDepartment.Tables[0];
             if (dataTable.Rows.Count == 0)
             {
                 this._DeptCode = "1";
             }
             else
             {
                 this._DeptCode = dataTable.Rows[0]["i_bmdm"].ToString();
             }
         }
         else
         {
             if (this.Page.Request.Params["code"] != null)
             {
                 this._DeptCode = this.Page.Request.Params["code"].ToString();
             }
         }
         string    str        = this.myAddress.depName(this._DeptCode);
         DataTable dataSource = this.cGetDeptLinkman(Convert.ToInt32(this._DeptCode));
         this.dgLinkman.DataSource = dataSource;
         this.dgLinkman.DataBind();
         this.lblTitle.Text = str + "通讯录";
         string    sqlString  = "SELECT * FROM PT_d_bm  WHERE i_bmdm='" + this._DeptCode + "'";
         DataTable dataTable2 = publicDbOpClass.DataTableQuary(sqlString);
         if (dataTable2.Rows.Count >= 1)
         {
             this.labaddress.Text = dataTable2.Rows[0]["adss"].ToString();
             this.labyb.Text      = dataTable2.Rows[0]["yb"].ToString();
             this.labfx.Text      = dataTable2.Rows[0]["fx"].ToString();
         }
     }
 }
Ejemplo n.º 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         TreeNode treeNode = new TreeNode();
         treeNode.Text  = "外部通讯录";
         treeNode.Value = "0";
         this.tvClient.Nodes.Add(treeNode);
         AddressListDb addressListDb = new AddressListDb();
         DataTable     dataTable     = addressListDb.eGetCorp();
         foreach (DataRow dataRow in dataTable.Rows)
         {
             TreeNode treeNode2 = new TreeNode();
             treeNode2.Text   = dataRow["v_mc"].ToString();
             treeNode2.Target = "LinkmanList";
             treeNode2.Value  = "?iClient=" + dataRow["i_id"].ToString() + "&strClientName=" + dataRow["v_mc"].ToString();
             treeNode.ChildNodes.Add(treeNode2);
         }
     }
 }
Ejemplo n.º 8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.ald = new AddressListDb();
     if (!this.Page.IsPostBack)
     {
         if (base.Request.QueryString["iGroup"] == null)
         {
             this.lblTitle.Text = "最近增加的联系人";
             DataTable dataSource = this.ald.pLastLinkmanQuary(15, this.Page.Session["yhdm"].ToString());
             this.dgLinkman.DataSource = dataSource;
             this.dgLinkman.DataBind();
             return;
         }
         this.lblTitle.Text = base.Request.QueryString["strGroupName"].ToString() + " 下的联系人";
         this.strGroup      = base.Request.QueryString["iGroup"].ToString();
         this.btnAddLinkman.Style.Remove("display");
         this.btnDelLinkman.Visible = true;
         this.btnDelLinkman.Attributes["onclick"] = "javascript:if(!confirm('真的要删除选定记录吗?')){return false;}";
         this.dgLinkman_DataBind(this.strGroup);
         this.hdnGroup.Value = this.strGroup;
     }
 }
Ejemplo n.º 9
0
 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 = "增加联系人";
                 return;
             }
             if (base.Request.QueryString["Op"].ToString() == "Mod")
             {
                 this.lblTitle.Text = "修改联系人";
                 DataTable dataTable = this.ald.eGetLinkman(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.tbHandset.Text    = dataTable.Rows[0]["v_sj"].ToString();
                 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();
                 return;
             }
         }
         else
         {
             this.btnClose.Visible     = false;
             this.btnConfirm.Visible   = false;
             this.tbName.Visible       = false;
             this.rblSex.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.tbHandset.Visible    = false;
             this.tbEmail.Visible      = false;
             this.tbQQ.Visible         = false;
             this.tbContent.Visible    = false;
             new userManageDb();
             DataTable dataTable2 = this.ald.eGetLinkman(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  = dataTable2.Rows[0]["v_zw"].ToString();
             this.Table1.Rows[4].Cells[1].InnerText  = dataTable2.Rows[0]["v_jtzz"].ToString();
             this.Table1.Rows[5].Cells[1].InnerText  = dataTable2.Rows[0]["v_yzbm"].ToString();
             this.Table1.Rows[6].Cells[1].InnerText  = dataTable2.Rows[0]["v_bgdh"].ToString();
             this.Table1.Rows[7].Cells[1].InnerText  = dataTable2.Rows[0]["v_cz"].ToString();
             this.Table1.Rows[8].Cells[1].InnerText  = dataTable2.Rows[0]["v_zzdh"].ToString();
             this.Table1.Rows[9].Cells[1].InnerText  = dataTable2.Rows[0]["v_sj"].ToString();
             this.Table1.Rows[10].Cells[1].InnerText = dataTable2.Rows[0]["v_dzyx"].ToString();
             this.Table1.Rows[11].Cells[1].InnerText = dataTable2.Rows[0]["v_wlch"].ToString();
             this.Table1.Rows[12].Cells[1].InnerText = dataTable2.Rows[0]["v_bz"].ToString();
             this.lblTitle.Text = dataTable2.Rows[0]["v_xm"].ToString() + "的详细信息";
         }
     }
 }
Ejemplo n.º 10
0
 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() + "的详细信息";
         }
     }
 }
Ejemplo n.º 11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     new com.jwsoft.sysManage.common.Calendar(this.Page);
     this.tbBirthday.Attributes["onClick"] = "opencalendar(this)";
     this.ald = new AddressListDb();
     if (!this.Page.IsPostBack)
     {
         if (base.Request.QueryString["Op"].ToString() == "Add")
         {
             this._strGroup = base.Request.QueryString["Group"].ToString();
             this.ddlGroup_DataBind();
             this.Label1.Text = "增加联系人";
             return;
         }
         if (base.Request.QueryString["Op"].ToString() == "Mod")
         {
             string    id        = base.Request.QueryString["id"].ToString();
             DataTable dataTable = this.ald.pGetLinkman(id);
             this._strGroup = dataTable.Rows[0]["i_fz_id"].ToString();
             this.ddlGroup_DataBind();
             this.tbName.Text          = dataTable.Rows[0]["v_xm"].ToString();
             this.rbtSex.SelectedValue = dataTable.Rows[0]["c_xb"].ToString();
             this.tbUnit.Text          = dataTable.Rows[0]["v_dw"].ToString();
             this.tbHandset.Text       = dataTable.Rows[0]["v_sj"].ToString();
             this.tbHomePhone.Text     = dataTable.Rows[0]["v_zzdh"].ToString();
             this.tbCorpPhone.Text     = dataTable.Rows[0]["v_bgdh"].ToString();
             if (dataTable.Rows[0]["dtm_sr"].ToString().Trim() != "")
             {
                 this.tbBirthday.Text = Convert.ToDateTime(dataTable.Rows[0]["dtm_sr"]).ToString("d");
             }
             this.tbAddress.Text    = dataTable.Rows[0]["v_jtzz"].ToString();
             this.tbPostalcode.Text = dataTable.Rows[0]["c_yzbm"].ToString();
             this.tbQQ.Text         = dataTable.Rows[0]["v_wlch"].ToString();
             this.tbEmail.Text      = dataTable.Rows[0]["v_dzyx"].ToString();
             this.tbContent.Text    = dataTable.Rows[0]["v_bz"].ToString();
             this.Label1.Text       = "修改联系人";
             return;
         }
         if (base.Request.QueryString["Op"].ToString() == "Browse")
         {
             this.butcancel.Visible = false;
             string    id2        = base.Request.QueryString["id"].ToString();
             DataTable dataTable2 = this.ald.pGetLinkman(id2);
             this._strGroup = dataTable2.Rows[0]["i_fz_id"].ToString();
             this.ddlGroup_DataBind();
             this.tbName.Text          = dataTable2.Rows[0]["v_xm"].ToString();
             this.rbtSex.SelectedValue = dataTable2.Rows[0]["c_xb"].ToString();
             this.tbUnit.Text          = dataTable2.Rows[0]["v_dw"].ToString();
             this.tbHandset.Text       = dataTable2.Rows[0]["v_sj"].ToString();
             this.tbHomePhone.Text     = dataTable2.Rows[0]["v_zzdh"].ToString();
             this.tbCorpPhone.Text     = dataTable2.Rows[0]["v_bgdh"].ToString();
             if (dataTable2.Rows[0]["dtm_sr"].ToString().Trim() != "")
             {
                 this.tbBirthday.Text = Convert.ToDateTime(dataTable2.Rows[0]["dtm_sr"]).ToString("d");
             }
             this.tbAddress.Text       = dataTable2.Rows[0]["v_jtzz"].ToString();
             this.tbPostalcode.Text    = dataTable2.Rows[0]["c_yzbm"].ToString();
             this.tbQQ.Text            = dataTable2.Rows[0]["v_wlch"].ToString();
             this.tbEmail.Text         = dataTable2.Rows[0]["v_dzyx"].ToString();
             this.tbContent.Text       = dataTable2.Rows[0]["v_bz"].ToString();
             this.Label1.Text          = "查看联系人";
             this.tbName.Enabled       = false;
             this.rbtSex.Enabled       = false;
             this.tbUnit.Enabled       = false;
             this.tbHandset.Enabled    = false;
             this.tbHomePhone.Enabled  = false;
             this.tbCorpPhone.Enabled  = false;
             this.tbBirthday.Enabled   = false;
             this.tbAddress.Enabled    = false;
             this.tbPostalcode.Enabled = false;
             this.tbQQ.Enabled         = false;
             this.tbEmail.Enabled      = false;
             this.tbContent.Enabled    = false;
             this.ddlGroup.Enabled     = false;
             this.tbnAdd.Visible       = false;
         }
     }
 }