Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         List <Skill>         dbdata          = new List <Skill>();
         RegistrationCheckbox checkboxDetails = new RegistrationCheckbox();
         dbdata = checkboxDetails.registrationCheckboxFill();
         foreach (Skill s in dbdata)
         {
             ListItem item = new ListItem();
             item.Value = s.SkillId.ToString();
             item.Text  = s.SkillName;
             CheckBoxList1.Items.Add(item);
         }
     }
 }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Details d   = new Details();
                long    det = d.smedet(Session["adminlogin"].ToString());
                RequestManagementSql smeDetail = new RequestManagementSql();
                model.SME            smeDao    = new model.SME();
                smeDao        = smeDetail.getSme(det);
                Label1.Text   = smeDao.SmeId.ToString();
                TextBox1.Text = smeDao.First_name;
                TextBox2.Text = smeDao.Last_name;
                TextBox3.Text = smeDao.Gender;
                TextBox4.Text = smeDao.Age.ToString();
                TextBox5.Text = smeDao.Contact_no.ToString();
                TextBox6.Text = smeDao.EmailId;
                TextBox7.Text = smeDao.Description;


                List <Skill>         dbdata          = new List <Skill>();
                RegistrationCheckbox checkboxDetails = new RegistrationCheckbox();
                dbdata = checkboxDetails.registrationCheckboxFill();
                foreach (Skill s in dbdata)
                {
                    ListItem item = new ListItem();
                    item.Value = s.SkillId.ToString();
                    item.Text  = s.SkillName;
                    CheckBoxList1.Items.Add(item);
                }
                SmeDao       sme       = new SmeDaoSqlImpl();
                List <Skill> skilllist = new List <Skill>();
                skilllist = sme.getsmeSkillList(det);

                foreach (ListItem item in CheckBoxList1.Items)
                {
                    foreach (Skill a in skilllist)
                    {
                        if (item.Value == a.SkillId.ToString())
                        {
                            item.Selected = true;
                        }
                    }
                }
            }
        }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         List <Skill>         dbdata          = new List <Skill>();
         RegistrationCheckbox checkboxDetails = new RegistrationCheckbox();
         dbdata = checkboxDetails.registrationCheckboxFill();
         foreach (Skill s in dbdata)
         {
             ListItem item = new ListItem();
             item.Value = s.SkillId.ToString();
             item.Text  = s.SkillName;
             RadioButtonList1.Items.Add(item);
         }
         string name = Session["adminlogin"].ToString();
         Label2.Text = name;
     }
 }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Details d   = new Details();
            long    det = d.trainerdet(Session["adminlogin"].ToString());

            if (!IsPostBack)
            {
                RequestManagementSql trainerDetail = new RequestManagementSql();
                model.Trainer        trainerDao    = new model.Trainer();
                trainerDao    = trainerDetail.getTrainer(det);
                Label1.Text   = trainerDao.TrainerId.ToString();
                TextBox1.Text = trainerDao.First_name;
                TextBox2.Text = trainerDao.Last_name;
                TextBox3.Text = trainerDao.Gender;
                TextBox4.Text = trainerDao.Age.ToString();
                TextBox5.Text = trainerDao.Contact_no.ToString();
                TextBox6.Text = trainerDao.EmailId;
                TextBox7.Text = trainerDao.Description;

                List <Skill>         dbdata          = new List <Skill>();
                RegistrationCheckbox checkboxDetails = new RegistrationCheckbox();
                dbdata = checkboxDetails.registrationCheckboxFill();
                foreach (Skill s in dbdata)
                {
                    ListItem item = new ListItem();
                    item.Value = s.SkillId.ToString();
                    item.Text  = s.SkillName;
                    CheckBoxList1.Items.Add(item);
                }
                TrainerDao   train     = new TrainerDaoSqlImpl();
                List <Skill> skilllist = new List <Skill>();
                skilllist = train.getTrainerSkillList(det);

                foreach (ListItem item in CheckBoxList1.Items)
                {
                    foreach (Skill a in skilllist)
                    {
                        if (item.Value == a.SkillId.ToString())
                        {
                            item.Selected = true;
                        }
                    }
                }



                //        foreach (Skill a in skilllist)
                //    {

                //        //for (int i = 0; i < skilllist.Count; i++)
                //        //{
                //            if (a.SkillId == 1)
                //            {
                //                CheckBoxList1.Items[i].Selected = true;
                //            }
                //            else if (a.SkillId == 2)
                //            {
                //                CheckBoxList1.Items[i].Selected = true;
                //            }
                //            else if (a.SkillId == 3)
                //            {
                //                CheckBoxList1.Items[i].Selected = true;
                //            }
                //            else if (a.SkillId == 4)
                //            {
                //                CheckBoxList1.Items[i].Selected = true;
                //            }
                //        //}
                //}
            }
        }