Exemple #1
0
 public void BindSysResDDL(System.Web.UI.WebControls.DropDownList ddl, string tablename, string cond,string orderby, bool withblankitem)
 {
     SysResDAL sysResDAL = new SysResDAL(conn);
     DataSet ds = sysResDAL.GetSysResDS(tablename, cond, orderby);
     ddl.DataSource = ds;
     ddl.DataTextField = "name";
     ddl.DataValueField = "code";
     ddl.DataBind();
     if (withblankitem){
         ddl.Items.Insert(0,new System.Web.UI.WebControls.ListItem("", ""));
     }
 }
Exemple #2
0
        private void BindData()
        {
            string pid = this._personid;
            ViewState["personid"] = pid;

            PersonDAL personDAL = new PersonDAL(_conn);
            SysResDAL sysResDAL = new SysResDAL(_conn);

            DataRow pa = personDAL.GetAPerson(pid);
            if (null == pa) return;

            this.lRealName.Text = Functions.CleanDBString(pa["realname"]);
            this.lBirthday.Text = Functions.GetShortDateStringFromNullableDateTime(Functions.CleanDBDateTime(pa["birthday"]));
            this.lIDNumber.Text = Functions.CleanDBString(pa["idnumber"]);
            this.lHujidi.Text = Functions.CleanDBString(pa["hujidi"]);
            this.lSex.Text = SexHashTable.GetName(Functions.CleanDBInt(pa["gendar"]));
            this.lPeople.Text = sysResDAL.GetResName("res_people", Functions.CleanDBString(pa["people"]));
            this.lRealName.Text = Functions.CleanDBString(pa["realname"]);
        }
Exemple #3
0
        private void BindData(SqlConnection conn)
        {
            string cpid = Functions.ParseStr(ViewState["cpid"]);
            CorpDAL corpDAL = new CorpDAL(conn);
            SysResDAL sysResDAL = new SysResDAL(conn);

            DataRow pa = corpDAL.GetAPersonApplyInfoByCPID(cpid);
            if (null == pa) return;

            ViewState["person.id"] = Functions.CleanDBGuid(pa["person_id"]);
            ViewState["cp_status"] = Functions.CleanDBInt(pa["cp_status"]);

            PersonInfo.Conn = conn;
            PersonInfo.PersonID = Functions.CleanDBGuid(pa["person_id"]);

            CorpPersonLog.CPID = cpid;
            CorpPersonLog.XmlGridFile = "../corp/lists.xml";
            CorpPersonLog.XmlGridName = "corppersonlog";
            CorpPersonLog.BindGrid();
        }