Exemple #1
0
 private static void SchoolListByAreaGridView(ref GridView myGridView, string method, string userID, string schoolyear, string schoolcode, string schoolArea)
 {
     try
     {
         if (method == "DataSet")
         {
             DataTable gridData = PLFSchoolList.SchoolListByArea("Get", userID, schoolyear, schoolcode, schoolArea).Tables[0];
             myGridView.DataSource = gridData;
             myGridView.DataBind();
         }
         if (method == "iList")
         {
             IListRepository <Employee2, string> repository = Factory.Get <EmployeeList>();
             IList <Employee2> gridData = repository.GetListItems(WorkingProfile.UserRole, userID, schoolyear, schoolcode); //, schoolArea);
             myGridView.DataSource = gridData;
             myGridView.DataBind();
         }
         if (method == "Dapper")
         {
             List <School> schools       = new List <School>();
             DataAccessLay dataaccesslay = new DataAccessLay();
             schools = dataaccesslay.GetSchools("Get", userID, schoolyear, schoolcode, schoolArea);
             myGridView.DataSource = schools;
             myGridView.DataBind();
         }
     }
     catch (System.Exception ex)
     {
         string em = ex.Message;
     }
 }
        public async Task <IActionResult> GetListItems()
        {
            var listItems = await _repo.GetListItems();

            //var listToReturn = _mapper.Map<IEnumerable<WordDto>>(vocabolary);

            return(Ok(listItems));
        }
Exemple #3
0
 private static void SchoolHistoryGridView(ref GridView myGridView, string method, string userID, string schoolyear, string schoolcode)
 {
     try
     {
         if (method == "DataSet")
         {
             DataTable gridData = PLFSchoolList.History("Get", userID, schoolyear, schoolcode).Tables[0];
             myGridView.DataSource = gridData;
             myGridView.DataBind();
         }
         if (method == "iList")
         {
             IListRepository <Employee2, string> repository = Factory.Get <EmployeeList>();
             IList <Employee2> gridData = repository.GetListItems(WorkingProfile.UserRole, userID, schoolyear, schoolcode);
             myGridView.DataSource = gridData;
             myGridView.DataBind();
         }
     }
     catch (System.Exception ex)
     {
         string em = ex.Message;
     }
 }