Ejemplo n.º 1
0
        // Populate the page with entity data
        private void PopulatePage()
        {
            int userId = 0;

            try
            {
                userId = Security.GetCurrentUserId();
            }
            catch
            {
                Security.RedirectToHomePage();
            }
            List <BatchDto> batches = BatchService.GetBatches(userId);

            BatchGridView.DataSource = null;
            BatchGridView.DataBind();
            hiddenDiv.Visible = false;

            if (batches.Count > 0)
            {
                BatchGridView.DataSource = batches;
                BatchGridView.DataBind();
            }
            else
            {
                hiddenDiv.Visible = true;
            }
        }
Ejemplo n.º 2
0
        // Populate the page for a specific User with entity data
        private void PopulatePage(int userId)
        {
            List <BatchDto> batches = BatchService.GetBatches(userId);

            BatchGridView.DataSource = null;
            BatchGridView.DataBind();
            hiddenDiv.Visible = false;

            if (batches.Count > 0)
            {
                BatchGridView.DataSource = batches;
                BatchGridView.DataBind();
            }
            else
            {
                hiddenDiv.Visible = true;
            }
        }
Ejemplo n.º 3
0
 public ActionResult Index()
 {
     return(View(batchservice.GetBatches()));
 }
Ejemplo n.º 4
0
        public IQueryable <Batch> Get()
        {
            BatchService batchService = new BatchService();

            return(batchService.GetBatches());
        }
Ejemplo n.º 5
0
        // GET: Batch
        public ActionResult Index()
        {
            BatchService batchService = new BatchService();

            return(View(batchService.GetBatches()));
        }