Ejemplo n.º 1
0
 //Fill drop Down Type
 public void fillDDLtype()
 {
     try
     {
         btnSubmit.Visible = false;
         if (ddlType.SelectedValue != "-1")
         {
             lblError.Text   = "";
             lblSuccess.Text = "";
             List <Nits.Model.Unit> UList = Rdal.getUnits();
             ddlType.DataSource = UList;
             ddlType.DataBind();
             ddlType.Items.Insert(0, new ListItem("--Select Unit--", "-1"));
             btnSubmit.Visible = false;
         }
         else
         {
             gvMarks.DataSource = null;
             gvMarks.DataBind();
             btnSubmit.Visible = false;
         }
     }
     catch (Exception ex)
     {
         lblError.Text = ex.ToString();
     }
 }
Ejemplo n.º 2
0
 //Fill drop Down Type
 public void fillDDLtype()
 {
     try
     {
         lblError.Text   = "";
         lblSuccess.Text = "";
         List <Nits.Model.Unit> UList = Rdal.getUnits();
         ddlType.DataSource = UList;
         ddlType.DataBind();
         ddlType.Items.Insert(0, new ListItem("--Select Unit--", "-1"));
     }
     catch (Exception ex)
     {
         lblError.Text = ex.ToString();
     }
 }