Exemple #1
0
        protected void FilterDept(object sender, EventArgs e) //action fired after selecting facility
        {
            DepartmentDropDownList.DataSource = DepartmentManagementSystem.getDepartmentsFromThisFacility(FacilityDropDownList.SelectedItem.Value);
            DepartmentDropDownList.DataBind();

            DepartmentDropDownList.Items.Insert(0, new ListItem("(Select a Department)", "-1"));
        }
 public void GetAllDepartment()
 {
     DepartmentDropDownList.DataSource     = _ViewClassScheduleManager.GetAllDepartment();
     DepartmentDropDownList.DataTextField  = "DeptCode";
     DepartmentDropDownList.DataValueField = "Id";
     DepartmentDropDownList.DataBind();
     DepartmentDropDownList.Items.Insert(0, new ListItem("Select Department", "0"));
 }
Exemple #3
0
 public void Refresh()
 {
     txtStudentName.Text  = "";
     txtStudentEmail.Text = "";
     txtContactNo.Text    = "";
     txtAddress.Text      = "";
     DepartmentDropDownList.ClearSelection();
 }
 public void Refresh()
 {
     txtCourseCode.Text  = "";
     txtCourseName.Text  = "";
     txtCredit.Text      = "";
     txtDescription.Text = "";
     DepartmentDropDownList.ClearSelection();
     SemestersDropDownList.ClearSelection();
 }
Exemple #5
0
        protected void BlockDropDownList_SelectedIndexChanged(object sender, EventArgs e)
        {
            DepartmentDropDownList.DataSource = dal.GetDepartment(BlockDropDownList.SelectedValue);
            DepartmentDropDownList.DataBind();

            DivisionDropDownList.DataSource = dal.GetDivision(DepartmentDropDownList.SelectedValue);
            DivisionDropDownList.DataBind();

            UpdateGrid();
        }
 public void Refresh()
 {
     txtCourseCredit.Text    = "";
     txtCourseName.Text      = "";
     txtCreditTaken.Text     = "";
     txtRemainingCredit.Text = "";
     DepartmentDropDownList.ClearSelection();
     TeacherDropDownList.ClearSelection();
     CourseDropDownList.ClearSelection();
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         MultiView1.ActiveViewIndex = 0;
         BindEmployeeListGrid(DataAccess2.GetEmployeesList());
         DepartmentDropDownList.DataSource = DataAccess2.GetDepartments();
         DepartmentDropDownList.DataBind();
     }
 }
 public void Refresh()
 {
     txtTeacherName.Text    = "";
     txtTeacherAddress.Text = "";
     txtTeacherEmail.Text   = "";
     txtContactNo.Text      = "";
     txtCreditTaken.Text    = "";
     DepartmentDropDownList.ClearSelection();
     DesignationDropDownList.ClearSelection();
 }
Exemple #9
0
        public void GetAllDepartment()
        {
            DepartmentDropDownList.DataSource     = _StudentsManager.GetAllDepartment();
            DepartmentDropDownList.DataTextField  = "DeptName";
            DepartmentDropDownList.DataValueField = "DeptCode";
            DepartmentDropDownList.DataBind();
            DepartmentDropDownList.Items.Insert(0, new ListItem("Select Department", "0"));
            Courses _Course = new Courses();

            _Course.DepartmentId = Convert.ToInt32(DepartmentDropDownList.SelectedValue);
        }
        public void GetDepartment()
        {
            DepartmentDropDownList.DataSource     = _TeachersManager.GetDepartment();
            DepartmentDropDownList.DataTextField  = "DeptName";
            DepartmentDropDownList.DataValueField = "Id";
            DepartmentDropDownList.DataBind();
            DepartmentDropDownList.Items.Insert(0, new ListItem("Select Department", "0"));
            Teachers _Teachers = new Teachers();

            _Teachers.DepartmentId = Convert.ToInt32(DepartmentDropDownList.SelectedValue);
        }
Exemple #11
0
        protected void HospitalDropDownList_SelectedIndexChanged(object sender, EventArgs e)
        {
            //set opening and closing label to visible
            if (HospitalDropDownList.SelectedItem.ToString() != "-Select a Hospital-")
            {
                lb_openingHrs.Visible = true;
                lb_closingHrs.Visible = true;
                lblHospital.Visible   = false;
            }
            else
            {
                lb_openingHrs.Visible = false;
                lb_closingHrs.Visible = false;
            }
            lblTime.Text = "";

            DepartmentDropDownList.DataSource     = DepartmentManagementSystem.getDepartments(HospitalDropDownList.SelectedValue.ToString());
            DepartmentDropDownList.DataTextField  = "departmentName";
            DepartmentDropDownList.DataValueField = "departmentID";
            DepartmentDropDownList.DataBind();


            DepartmentDropDownList.Items.Insert(0, new ListItem("(Select a Department)", "-1"));

            //get opening hours and set it
            if (HospitalDropDownList.SelectedValue.ToString() != "-1")
            {
                Facility f = FacilityManagementSystem.getOpeningHrs(HospitalDropDownList.SelectedValue.ToString());
                HourChange("AM");

                AMPMDropDownList.ClearSelection();
                AMPMDropDownList.Items.FindByText(f.openingHrs.Substring(4, 2)).Selected = true;

                lb_actualOpening.Text    = f.generalInfo;
                lb_actualClosing.Text    = f.region;
                lb_actualClosing.Visible = true;
                lb_actualOpening.Visible = true;
            }
            else
            {
                HourDropDownList.Items.Clear();
                HourDropDownList.Items.Insert(0, new ListItem("-Hr-", "-1"));
                MinDropDownList.Items.Clear();
                MinDropDownList.Items.Insert(0, new ListItem("-Min-", "-1"));

                AMPMDropDownList.ClearSelection();

                lb_actualClosing.Visible = false;
                lb_actualOpening.Visible = false;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Account a = new Account();

            a = (Account)Session["Account"];

            if (a == null)
            {
                Response.Redirect("LoginPage.aspx");
            }
            if (!a.accountType.Equals("admin"))
            {
                Response.Redirect("LoginPage.aspx");
            }
            if (!IsPostBack)
            {
                int id = Int32.Parse((string)Session["doc_id"]);

                a = AccountManagementSystem.GetAccount(id);
                txtNric.Attributes.Add("placeholder", a.nric);
                txtName.Attributes.Add("placeholder", a.name);
                txtPassword.Attributes.Add("placeholder", a.password);
                txtEmail.Attributes.Add("placeholder", a.email);
                txtAddress.Attributes.Add("placeholder", a.address);

                Department D = new Department();
                D = DepartmentManagementSystem.GetDepartmentByUserID(id);


                Facility F = new Facility();
                F = FacilityManagementSystem.GetFacility(D.facilityId);

                FacilityDropDownList.DataSource = FacilityManagementSystem.GetAllfacility();
                FacilityDropDownList.DataBind();

                FacilityDropDownList.SelectedValue = F.facilityID.ToString();


                DepartmentDropDownList.DataSource = DepartmentManagementSystem.getDepartmentsFromThisFacility(FacilityDropDownList.SelectedItem.Value);
                DepartmentDropDownList.DataBind();


                DepartmentDropDownList.SelectedValue = D.departmentID.ToString();
            }
        }
Exemple #13
0
        private void UserDivision()
        {
            string U = Context.User.Identity.Name;
            string UU = U.Substring(U.IndexOf(@"\") + 1);

            int dv, dp, b;

            dal.UserDivision(UU, out dv, out dp, out b);

            if (dv != 0)
            {
                BlockDropDownList.DataSource = dal.GetBlock();
                BlockDropDownList.DataBind();
                BlockDropDownList.SelectedValue = b.ToString();

                DepartmentDropDownList.DataSource = dal.GetDepartment(BlockDropDownList.SelectedValue);
                DepartmentDropDownList.DataBind();
                DepartmentDropDownList.SelectedValue = dp.ToString();

                DivisionDropDownList.DataSource = dal.GetDivision(DepartmentDropDownList.SelectedValue);
                DivisionDropDownList.DataBind();
                DivisionDropDownList.SelectedValue = dv.ToString();
            }
            else
            {
                BlockDropDownList.DataSource = dal.GetBlock();
                BlockDropDownList.DataBind();

                DepartmentDropDownList.DataSource = dal.GetDepartment(BlockDropDownList.SelectedValue);
                DepartmentDropDownList.DataBind();

                DivisionDropDownList.DataSource = dal.GetDivision(DepartmentDropDownList.SelectedValue);
                DivisionDropDownList.DataBind();
            }
        
        }