protected void BtnSaveSupervisor_Click(object sender, EventArgs e) { string supervisor = SupervisorNameTxt.Text.ToUpper(); string classtype = ClassTypeTxt.Text.ToUpper(); if (classtype == "" || supervisor == "") { (Master as Frame).PopUp("Please fill-up all the data"); return; } bool IsInsert = false; try { IsInsert = Kiosk_Class.InsertSupervisor(classtype, supervisor, GlobalAccess.EmpID); } catch (Exception ee) { (Master as Frame).PopUp(ee.Message); } if (IsInsert) { (Master as Frame).PopUp("Supervisor Added Successfully!"); SupervisorNameTxt.Text = " "; ClassTypeTxt.Text = " "; loadSupervisor(); } }
private void loadSupervisor() { ddlClass.DataSource = Kiosk_Class.GetAllSupervisor(); ddlClass.DataTextField = "SuperVisor"; ddlClass.DataValueField = "ClassID"; ddlClass.DataBind(); // ListItem item = new ListItem(); item.Text = " [<<<Select Here>>>] "; item.Value = "0"; ddlClass.Items.Insert(0, item); }