Esempio n. 1
0
        protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            SmeDao     sme     = new SmeDaoSqlImpl();
            List <SME> trainer = new List <SME>();
            // trainer = trainerdao.getTrainerListAdmin();
            long smeid = 0;

            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                smeid = long.Parse(e.Row.Cells[0].Text.ToString());
                //string h = e.Row.Cells[0].Text;
                DropDownList ddl       = (e.Row.FindControl("DropDownList1") as DropDownList);
                List <Skill> skillList = new List <Skill>();
                skillList = sme.getsmeSkillList(smeid);

                if (skillList.Count == 0)
                {
                    ddl.Items.Add("No Skills");
                }
                else
                {
                    ddl.DataSource     = skillList;
                    ddl.DataTextField  = "SkillName";
                    ddl.DataValueField = "SkillId";
                    ddl.DataBind();
                }
            }
        }
Esempio 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;
                        }
                    }
                }
            }
        }
Esempio n. 3
0
        public void BindData()
        {
            List <SmeDetails> smeDetailsList = new List <SmeDetails>();

            model.SmeDetails smedao      = new model.SmeDetails();
            MoreDetails      moredetails = new MoreDetailsSqlImpl();

            smedao         = moredetails.getSmeDetails(long.Parse(Request.QueryString["smeId"]));
            TextBox1.Text  = smedao.SmeId.ToString();
            TextBox2.Text  = smedao.First_name;
            TextBox3.Text  = smedao.Last_name;
            TextBox4.Text  = smedao.Gender;
            TextBox5.Text  = smedao.Age.ToString();
            TextBox6.Text  = smedao.Contact_no.ToString();
            TextBox7.Text  = smedao.EmailId;
            TextBox11.Text = smedao.Description;
            TextBox9.Text  = smedao.StartDate.ToString();
            TextBox10.Text = smedao.EndDate.ToString();
            TextBox8.Text  = smedao.Availability.ToString();
            SmeDao     sme     = new SmeDaoSqlImpl();
            List <SME> trainer = new List <SME>();
            // trainer = trainerdao.getTrainerListAdmin();
            long         smeid     = long.Parse(Request.QueryString["smeid"]);
            List <Skill> skillList = new List <Skill>();

            skillList = sme.getsmeSkillList(smeid);

            if (skillList.Count == 0)
            {
                DropDownList1.Items.Add("No Skills");
            }
            else
            {
                DropDownList1.DataSource     = skillList;
                DropDownList1.DataTextField  = "SkillName";
                DropDownList1.DataValueField = "SkillId";
                DropDownList1.DataBind();
            }
        }