Example #1
0
        public string GetCurrentSy()
        {
            SchoolYearService sys = new SchoolYearService();
            SchoolYear        sy  = sys.GetCurrentSY();

            return(sy.SY);
        }
Example #2
0
        public void LoadSY()
        {
            gvSY.DataSource = null;
            ISchoolYearService syService = new SchoolYearService();
            string message = String.Empty;
            try
            {
                var sy = syService.GetAllSY();
                SYList = new List<SchoolYear>(sy);
                gvSY.DataSource = SYList;
                gvSY.Refresh();

                if (gvSY.RowCount != 0)
                    gvSY.Rows[0].IsSelected = true;


                SYcurrent = SYList.Find(x => x.CurrentSY == true);
            }
            catch (Exception ex)
            {
                message = "Error Loading List of School Years";
                MessageBox.Show(ex.ToString());
            }

        }
Example #3
0
        public List<GradeSection> GetAllGradeSections()
        {
            SchoolYearService sys = new SchoolYearService();

            string currentSY = String.Empty;
            currentSY = sys.GetCurrentSY().SY;
            return ToGradeSectionList(gsLogic.GetAllGradeSections(currentSY));
        }
Example #4
0
        public List <GradeSection> GetAllGradeSections()
        {
            SchoolYearService sys = new SchoolYearService();

            string currentSY = String.Empty;

            currentSY = sys.GetCurrentSY().SY;
            return(ToGradeSectionList(gsLogic.GetAllGradeSections(currentSY)));
        }
Example #5
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (SYSelected != null)
            {
                ISchoolYearService syService = new SchoolYearService();
                string message = String.Empty;

                if (!syService.DeleteSY(SYSelected.SY, ref message))
                {
                    message = "Deletion of School Year Failed";
                }
                else
                {
                   
                    Log("D", "SchoolYear", SYSelected);
                    MessageBox.Show("Deleted succesfully!");
                }
            }
        }
Example #6
0
        public List <SchoolYear> GetAllSY()
        {
            SchoolYearService sys = new SchoolYearService();

            return(sys.GetAllSY());
        }
Example #7
0
        public string GetCurrentSY()
        {
            SchoolYearService ss = new SchoolYearService();

            return(ss.GetCurrentSY().SY);
        }
Example #8
0
 public string GetCurrentSy()
 {
     SchoolYearService sys = new SchoolYearService();
     SchoolYear sy = sys.GetCurrentSY();
     return sy.SY;
 }
Example #9
0
        private void UpdateCurrentSY(string szSY, bool bSY)
        {
            try
            {
                Boolean ret = false;
                string message = String.Empty;

                ISchoolYearService syService = new SchoolYearService();
                SchoolYear schoolyear = new SchoolYear()
                {
                    SY = szSY,
                    CurrentSY = bSY
                };


                ret = syService.UpdateSY(ref schoolyear, ref message);
                schoolyear.CurrentSY = true;
                Log("U", "SchoolYear", schoolyear);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex.ToString());
            }
        }   
Example #10
0
        private void SaveSY()
        {
            try
            {
                Boolean ret = false;
                string message = String.Empty;

                int SYto = 0;
                SYto = int.Parse(txtSY.Text) + 1;
                                
                ISchoolYearService syService = new SchoolYearService();
                SchoolYear schoolyear = new SchoolYear()
                {
                    SY = txtSY.Text + "-" + SYto.ToString(),
                    CurrentSY = false
                };

              
                ret = syService.CreateSY(ref schoolyear, ref message);
                Log("C", "SchoolYear", schoolyear);
                MessageBox.Show("Saved Successfully!");
                LoadSY();

            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex.ToString());
            }
        }
Example #11
0
 public List<SchoolYear> GetLastFiveSY()
 {
     SchoolYearService sy = new SchoolYearService();
     return sy.GetAllSY();
 }
Example #12
0
 public List<SchoolYear> GetAllSchoolYears()
 {
     SchoolYearService s = new SchoolYearService();
     return s.GetAllSY();
 }
Example #13
0
        public List <SchoolYear> GetLastFiveSY()
        {
            SchoolYearService sy = new SchoolYearService();

            return(sy.GetAllSY());
        }
Example #14
0
        public SchoolYear GetCurrentSY()
        {
            SchoolYearService sy = new SchoolYearService();

            return(sy.GetCurrentSY());
        }
 public string GetCurrentSY()
 {
     SchoolYearService ss = new SchoolYearService();
     return ss.GetCurrentSY().SY;
 }
Example #16
0
 public SchoolYear GetCurrentSY()
 {
     SchoolYearService sy = new SchoolYearService();
     return sy.GetCurrentSY();
 }