protected void UploadButton_Click(object sender, EventArgs e)
 {
     if (FileUploader.HasFile)
     {
         try
         {
             using (CsvReader csv = new CsvReader(new StreamReader(FileUploader.FileContent), true))
             {
                 int count = 0;
                 while (csv.ReadNextRecord())
                 {
                     DepartmentPersonTableAdapters.un_ref_co_dept_peopleTableAdapter personTA = new DepartmentPersonTableAdapters.un_ref_co_dept_peopleTableAdapter();
                     personTA.Insert((int)Session[WebConstants.Session.REG_DEPT_ID], (int)Session[WebConstants.Session.REG_CO_ID],csv[0],
                         (int)Session[WebConstants.Session.REG_USER_ID], ParseBoolean(csv[1]), ParseBoolean(csv[2]), ParseBoolean(csv[3]));
                     count++;
                 }
                 SetInfoMessage(count + " people added to the system.");
             }
         }
         catch(Exception ex)
         {
             SetErrorMessage("Error processing the file. Please check its contents. File should be CSV and in the format shown below");
         }
     }
     else
     {
         SetErrorMessage("No file specified");
     }
 }
 protected void btnAdd_Click(object sender, EventArgs e)
 {
     if (isValid(0))
     {
         DepartmentPersonTableAdapters.un_ref_co_dept_peopleTableAdapter tableAdapter = new DepartmentPersonTableAdapters.un_ref_co_dept_peopleTableAdapter();
         tableAdapter.Insert(int.Parse(ddlDepartment.SelectedValue), loggedInUserCoId, tbName.Text, loggedInUserId,chkboxSupervisor.Checked,chkboxFirstAider.Checked,chkboxWarden.Checked);
         GridView1.DataBind();
         SetInfoMessage(WebConstants.Messages.Information.RECORD_SAVED);
     }
     //lbl
 }