private void setGrid()
        {
            FieldsRepository fr = new FieldsRepository();

            gvLessonGroups.DataSource = fr.getGardeFields(Session["GradeID"].ToString().ToInt());
            gvLessonGroups.DataBind();
        }
        private void setGrid()
        {
            FieldsRepository fr = new FieldsRepository();

            gvLessonGroups.DataSource = fr.getMaghateHaveFieldOfCurrentYear();
            gvLessonGroups.DataBind();
        }
        public void TestSearchEngine()
        {
            var repo = new FieldsRepository() {Context = AccessContext.Create()};
            var fields = repo.FullSearchAsync(new FilterOptionModel()
            {
                date = new DateTime(2015, 7, 10, 11, 0, 0),
                end = new DateTime(2015, 7, 11, 11, 0, 0),
                keywords = "",

            }).Result;

            Assert.IsNotNull(fields);
        }
        public void TestFullSearch()
        {
            var context = AccessContext.Create();

            var repository = new FieldsRepository {Context = context};

            var fullSearch = repository.FullSearchAsync(new FilterOptionModel
            {
                lat = "13.720858499999999",
                lon = "-89.2304515",

            }).Result;

            Assert.IsNotNull(fullSearch);
        }
        public void setLabel()
        {
            GradesRepository gr = new GradesRepository();

            lblMaghta.InnerText = gr.getGradeTitleByID(gid);
            FieldsRepository fr = new FieldsRepository();

            lblReshte.InnerText = fr.getFieldTitleByID(fid);

            StudentRepository sr = new StudentRepository();

            lblStudentsCount.InnerText = sr.countStudentsByFieldID_GradeID(fid, gid).ToString();

            vReportExamsRepository rep = new vReportExamsRepository();

            lblmianginkatbi.InnerText   = rep.getAverageOfFieldOfgrade(fid, gid, 0).ToString();
            lblmianginshafahi.InnerText = rep.getAverageOfFieldOfgrade(fid, gid, 1).ToString();
        }
 public FieldsMaintanceGrain(FieldsRepository fieldsRepository)
 {
     _fieldsRepository = fieldsRepository;
 }