private void ImportResources_Click(object sender, EventArgs e)
 {
     try
     {
         if (userResponse?.AccessToken != null)
         {
             OpenFileDialog openFileDialog1 = new OpenFileDialog();
             openFileDialog1.ShowDialog();
             openFileDialog1.Filter = "*.xlsx|*.xls";
             if (string.IsNullOrEmpty(openFileDialog1.FileName))
             {
                 MessageBox.Show("Please select proper excel file to process the Resources data");
             }
             else
             {
                 ResourceBusinessLogic.GetResources(userResponse.AccessToken, openFileDialog1.FileName).Wait();
             }
         }
         else
         {
             MessageBox.Show("Please login, before we process the data");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemple #2
0
        public IActionResult Index(ResourceSearchModel searchModel)
        {
            //var schoolContext = _context.Resources.Include(d => d.Culture);
            //return View(schoolContext);


            var business = new ResourceBusinessLogic(_context, _repoCulture, _repoResource);
            var model    = business.GetResources(searchModel);

            return(View(model));
        }