예제 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         try
         {
             if (Session["Username"] != null && Session["Token"] != null)
             {
                 student       = new Student();
                 student.Email = Session["Username"].ToString();
                 ReadStudentCommand cmd = new ReadStudentCommand(student);
                 cmd.Execute();
                 student         = cmd.Student;
                 name.Value      = student.Name;
                 last_name.Value = student.LastName;
                 email.Value     = student.Email;
                 phone.Value     = student.Phone;
                 password.Attributes.Add("value", student.Password);
                 password_conf.Attributes.Add("value", student.Password);
                 fec_nac.Value  = student.BirthDate.Date.ToString("MM/dd/yyyy");
                 grade_id.Value = student.Grade.Id.ToString();
             }
             else
             {
                 Response.Redirect("login.aspx");
             }
         }
         catch (Exception ex)
         {
         }
     }
 }
예제 #2
0
        protected void course_selected_leng(object sender, EventArgs e)
        {
            student       = new Student();
            student.Email = Session["Username"].ToString();
            ReadStudentCommand cmd_ = new ReadStudentCommand(student);

            cmd_.Execute();
            student   = cmd_.Student;
            course    = new Course();
            course.Id = "Leng" + student.Grade.Id + DateTime.Now.Year.ToString();
            ReadAllSectionByCourseCommand cmd = new ReadAllSectionByCourseCommand(course);

            cmd.Execute();
            section_list = cmd.Sections;
            foreach (Section section in section_list)
            {
                rb_mod.DataSource = section_list;
                rb_mod.DataBind();
            }

            if (rb_mod.Items.Count > 0)
            {
                div_mod.Visible = true;
            }
            else
            {
                div_mod.Visible = false;
            }
            rb_mod = null;
        }
예제 #3
0
        protected void pago_search(object sender, EventArgs e)
        {
            section    = new Section();
            section.Id = Int32.Parse(list_section.SelectedValue);
            ReadAllPaymentBySectionCommand cmd = new ReadAllPaymentBySectionCommand(section);

            cmd.Execute();

            list_pagos = cmd.Payments;
            foreach (AraPayment araPayments in list_pagos)
            {
                student       = new Student();
                student.Email = araPayments.Student.Email;
                ReadStudentCommand cmd_ = new ReadStudentCommand(student);
                cmd_.Execute();
                araPayments.Student = cmd_.Student;
            }
            prof_pagos.DataSource = list_pagos;
            prof_pagos.DataBind();
            div_table.Visible = true;
            //export.Visible = true;
        }
예제 #4
0
        protected void prof_search(object sender, EventArgs e)
        {
            DateTime fec_ini = DateTime.Parse(fec_in.Text);
            DateTime fec_fi  = DateTime.Parse(fec_fin.Text);
            ReadAllPaymentsBetweenDatesCommand cmd = new ReadAllPaymentsBetweenDatesCommand(fec_ini, fec_fi);

            cmd.Execute();

            list_pagos = cmd.Payments;
            foreach (AraPayment araPayments in list_pagos)
            {
                student       = new Student();
                student.Email = araPayments.Student.Email;
                ReadStudentCommand cmd_ = new ReadStudentCommand(student);
                cmd_.Execute();
                araPayments.Student = cmd_.Student;
            }

            prof_pagos.DataSource = list_pagos;
            prof_pagos.DataBind();
            div_table.Visible = true;
            //export.Visible = true;
        }