protected void Btn_Approve_Click(object sender, EventArgs e) { string supervisor = (string)Session["loginID"]; { if (dropdownlist1.Text != "---Select Clerk for this time---" && dropdownlist2.Text != "---Select Clerk for this time---" && dropdownlist3.Text != "---Select Clerk for this time---" && dropdownlist4.Text != "---Select Clerk for this time---" && dropdownlist5.Text != "---Select Clerk for this time---" && dropdownlist6.Text != "---Select Clerk for this time---") { string staff1 = storeStaffDAO.getStoreStaffIDbyName(dropdownlist1.Text); string staff2 = storeStaffDAO.getStoreStaffIDbyName(dropdownlist2.Text); string staff3 = storeStaffDAO.getStoreStaffIDbyName(dropdownlist3.Text); string staff4 = storeStaffDAO.getStoreStaffIDbyName(dropdownlist4.Text); string staff5 = storeStaffDAO.getStoreStaffIDbyName(dropdownlist5.Text); string staff6 = storeStaffDAO.getStoreStaffIDbyName(dropdownlist6.Text); collectionDAO.updatecollection(staff1, Label_CollectionPoint1.Text); collectionDAO.updatecollection(staff2, Label_CollectionPoint2.Text); collectionDAO.updatecollection(staff3, Label_CollectionPoint3.Text); collectionDAO.updatecollection(staff4, Label_CollectionPoint4.Text); collectionDAO.updatecollection(staff5, Label_CollectionPoint5.Text); collectionDAO.updatecollection(staff6, Label_CollectionPoint6.Text); NotificationDAO nDAO = new NotificationDAO(); string supervisorName = Session["loginName"].ToString(); nDAO.addStoreNotification(staff1, supervisorName + " assigned you in collection point " + Label_CollectionPoint1.Text, DateTime.Now); nDAO.addStoreNotification(staff2, supervisorName + " assigned you in collection point " + Label_CollectionPoint2.Text, DateTime.Now); nDAO.addStoreNotification(staff3, supervisorName + " assigned you in collection point " + Label_CollectionPoint3.Text, DateTime.Now); nDAO.addStoreNotification(staff4, supervisorName + " assigned you in collection point " + Label_CollectionPoint4.Text, DateTime.Now); nDAO.addStoreNotification(staff5, supervisorName + " assigned you in collection point " + Label_CollectionPoint5.Text, DateTime.Now); nDAO.addStoreNotification(staff6, supervisorName + " assigned you in collection point " + Label_CollectionPoint6.Text, DateTime.Now); } else { ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>win.alert('Notice', 'Please select all the clerks name for this time disbursements!');</script>"); } } }