示例#1
0
        protected void GetValue()
        {
            lblempno.Text           = "F-1411";
            tblemp.EmpID            = lblempno.Text;
            txtlname.Text           = tblemp.sp_Faculty_Display2().Rows[0][1].ToString();
            txtfname.Text           = tblemp.sp_Faculty_Display2().Rows[0][2].ToString();
            txtmname.Text           = tblemp.sp_Faculty_Display2().Rows[0][3].ToString();
            txtNkName.Text          = tblemp.sp_Faculty_Display2().Rows[0][4].ToString();
            drpGender.Text          = tblemp.sp_Faculty_Display2().Rows[0][5].ToString();
            txtCivilStatus.Text     = tblemp.sp_Faculty_Display2().Rows[0][6].ToString();
            drpReligion.Text        = tblemp.sp_Faculty_Display2().Rows[0][7].ToString();
            txtAddress.Text         = tblemp.sp_Faculty_Display2().Rows[0][8].ToString();
            txtEmail.Text           = tblemp.sp_Faculty_Display2().Rows[0][9].ToString();
            txtTelNo.Text           = tblemp.sp_Faculty_Display2().Rows[0][10].ToString();
            txtCellNo.Text          = tblemp.sp_Faculty_Display2().Rows[0][11].ToString();
            txtBday.Text            = tblemp.sp_Faculty_Display2().Rows[0][12].ToString();
            txtBplace.Text          = tblemp.sp_Faculty_Display2().Rows[0][13].ToString();
            lblStatus.Text          = tblemp.sp_Faculty_Display2().Rows[0][14].ToString();
            txtexpertin.Text        = tblemp.sp_Faculty_Display2().Rows[0][15].ToString();
            lblDeparment.Text       = tblemp.sp_Faculty_Display2().Rows[0][16].ToString();
            lblCollege.Text         = tblemp.sp_Faculty_Display2().Rows[0][17].ToString();
            lblATF.Text             = tblemp.sp_Faculty_Display2().Rows[0][18].ToString();
            lblRank.Text            = tblemp.sp_Faculty_Display2().Rows[0][19].ToString();
            lblfl_name.Text         = tblemp.sp_Faculty_Display2().Rows[0][20].ToString();
            imgProfilePict.ImageUrl = "../../Assets/dist/img/FacultyPict/" + tblemp.sp_Faculty_Display2().Rows[0][21].ToString();

            //Label lbl = new Label();
            //lbl.Text = "your text";
            //Panel1.Controls.Add(lbl);
            //lbl.Text = "your text 2";
            string s = tblemp.sp_Faculty_Display2().Rows[0][15].ToString();

            string[] words = s.Split(',');
            int      x     = 0;

            foreach (string word in words)
            {
                var   spacer = sp();
                Label lbl    = new Label();
                lbl.ID       = "lbl" + x.ToString();
                lbl.CssClass = "label label-primary";
                lbl.Text     = word;
                Panel1.Controls.Add(spacer);
                Panel1.Controls.Add(lbl);
                x++;
            }
        }
示例#2
0
 private void getValue_fromDb()
 {
     txtempno.Text       = xempid;
     tblemp.EmpID        = txtempno.Text;
     txtlname.Text       = tblemp.sp_Faculty_Display2().Rows[0][1].ToString();
     txtfname.Text       = tblemp.sp_Faculty_Display2().Rows[0][2].ToString();
     txtmname.Text       = tblemp.sp_Faculty_Display2().Rows[0][3].ToString();
     txtNkName.Text      = tblemp.sp_Faculty_Display2().Rows[0][4].ToString();
     drpGender.Text      = tblemp.sp_Faculty_Display2().Rows[0][5].ToString();
     drpCivilStatus.Text = tblemp.sp_Faculty_Display2().Rows[0][6].ToString();
     drpReligion.Text    = tblemp.sp_Faculty_Display2().Rows[0][7].ToString();
     txtAddress.Text     = tblemp.sp_Faculty_Display2().Rows[0][8].ToString();
     txtEmail.Text       = tblemp.sp_Faculty_Display2().Rows[0][9].ToString();
     txtTelNo.Text       = tblemp.sp_Faculty_Display2().Rows[0][10].ToString();
     txtCellNo.Text      = tblemp.sp_Faculty_Display2().Rows[0][11].ToString();
     txtBday.Text        = tblemp.sp_Faculty_Display2().Rows[0][12].ToString();
     txtBplace.Text      = tblemp.sp_Faculty_Display2().Rows[0][13].ToString();
     drpF_Status.Text    = tblemp.sp_Faculty_Display2().Rows[0][14].ToString();
     txtexpertin.Text    = tblemp.sp_Faculty_Display2().Rows[0][15].ToString();
     drpF_Type.Text      = tblemp.sp_Faculty_Display2().Rows[0][18].ToString();
     drpF_Rank.Text      = tblemp.sp_Faculty_Display2().Rows[0][19].ToString();
 }