Ejemplo n.º 1
0
        protected void LoginButtonClickPerformed(object sender, EventArgs e)
        {
            Admin admin = new Admin
            {
                Username = txtUsername.Text,
                Password = txtPassword.Text
            };

            A2RBusinessModel a2rBM = new A2RBusinessModel
            {
                AdminObj = admin
            };

            DataTable dt = a2rBM.SelectAdmin();

            if (dt.Rows.Count > 0)
            {
                Session["AdminWholeRecord"] = dt;

                Response.Redirect("~/RootAdmin/ControlPage.aspx");
            }
            else
            {
                lblStatus.Text = "Username or password not matched !";
            }
        }
Ejemplo n.º 2
0
        private void LoadAllSection()
        {
            A2RBusinessModel a2rBM = new A2RBusinessModel();
            DataTable        dt    = a2rBM.SelectAllSections();

            if (dt.Rows.Count > 0)
            {
                kbd1.InnerText  = dt.Rows[0]["NoOfSections"].ToString();
                kbd2.InnerText  = dt.Rows[1]["NoOfSections"].ToString();
                kbd3.InnerText  = dt.Rows[2]["NoOfSections"].ToString();
                kbd4.InnerText  = dt.Rows[3]["NoOfSections"].ToString();
                kbd5.InnerText  = dt.Rows[4]["NoOfSections"].ToString();
                kbd6.InnerText  = dt.Rows[5]["NoOfSections"].ToString();
                kbd7.InnerText  = dt.Rows[6]["NoOfSections"].ToString();
                kbd8.InnerText  = dt.Rows[7]["NoOfSections"].ToString();
                kbd9.InnerText  = dt.Rows[8]["NoOfSections"].ToString();
                kbd10.InnerText = dt.Rows[9]["NoOfSections"].ToString();
                kbd11.InnerText = dt.Rows[10]["NoOfSections"].ToString();
            }
            else
            {
                kbd1.InnerText  = "#";
                kbd2.InnerText  = "#";
                kbd3.InnerText  = "#";
                kbd4.InnerText  = "#";
                kbd5.InnerText  = "#";
                kbd6.InnerText  = "#";
                kbd7.InnerText  = "#";
                kbd8.InnerText  = "#";
                kbd9.InnerText  = "#";
                kbd10.InnerText = "#";
                kbd11.InnerText = "#";
            }
        }
Ejemplo n.º 3
0
        protected void btnStoreAndContinue_Click(object sender, EventArgs e)
        {
            List <RoutineSchema> routineSchemas = RoutineCollector.GetRoutineSchema();

            foreach (RoutineSchema rs in routineSchemas)
            {
                rs.SetCourseCode(rs.GetCourseCode().Replace(" ", ""));
            }

            A2RBusinessModel a2rBM = new A2RBusinessModel();

            a2rBM.InsertAllRecords(routineSchemas);

            Response.Redirect("~/Root/Redirect.aspx"); //TODO prev records
        }
Ejemplo n.º 4
0
        private void LoadEffectiveDate()
        {
            A2RBusinessModel a2rBM = new A2RBusinessModel();
            DataTable        dt    = a2rBM.SelectRoutineEffectiveDate();

            if (dt.Rows.Count > 0)
            {
                string rawDate = dt.Rows[0]["RoutineEffectiveFrom"].ToString();
                lblDate.Text = rawDate;
            }
            else
            {
                lblDate.Text = "[DATE NOT PROVIDED YET]";
            }
        }