Exemplo n.º 1
0
 // 数据绑定
 private void RptBind()
 {
     if (this.txtop.Value == "modify")
     {
         HyDept HyDept = new HyDept();
         DataTable dt = new DataTable();
         dt = HyDept.Getdept(this.txtdocid.Value);
         if (dt.Rows.Count > 0)
         {
             this.txtJgdz.Text = dt.Rows[0]["hy_deptAdd"].ToString();
             this.txtOrgDesc.Text = dt.Rows[0]["hy_deptDetail"].ToString();
             this.txtOrgId.Text = dt.Rows[0]["hy_deptid"].ToString();
             this.txtOrgName.Text = dt.Rows[0]["hy_deptname"].ToString();
             this.dr_isenabled.SelectedValue = dt.Rows[0]["hy_isenabled"].ToString();
             this.txtFuzheMan.Text = dt.Rows[0]["hy_fzr"].ToString();
             this.txtFuzheTel.Text = dt.Rows[0]["hy_fzrphone"].ToString();
             this.txtorder.Text = dt.Rows[0]["hy_deptsort"].ToString();
         }
     }
     else if (this.txtop.Value == "add")
     {
         //得到部门ID
         getDetpId();
     }
 }