Exemplo n.º 1
0
        public ActionResult Filter(InvoiceListModel postModel)
        {
            PopulateSecurityExtended();
            int securityProfileId = SecurityExtended.SecurityProfileId;
            var permissionList    = _sharedFunctions.GetSecuritySettings(securityProfileId, (int)SecurityCatEnum.RequireService, null);

            if (TempData["Equipment"] == null)
            {
                return(null);
            }

            InvoiceListModel invoiceListModel = new InvoiceListModel();

            int    locationId       = SecurityExtended.LocationId.Value;
            string equipment        = TempData["Equipment"].ToString();
            string filter           = postModel.TextFilter;
            string filterColumn     = postModel.SelectedColumn;
            string filterExpression = "";

            if (!string.IsNullOrEmpty(filter.Trim()))
            {
                filterExpression = filterColumn + " like '" + filter + "%'";
            }

            invoiceListModel.DataTableMoveHistory      = GetTankMoveHistory(locationId, equipment, filterExpression);
            invoiceListModel.DataTableEquipmentInfo    = GetEquipmentInfo(equipment);
            invoiceListModel.DataTableEquipmentProduct = GetEquipmentProduct(equipment);
            invoiceListModel.DataTableInvoiceHistory   = GetInvoiceHistory(equipment);

            invoiceListModel.HfShowResult = "true";
            invoiceListModel.TextSearch   = equipment;
            return(View("Index", invoiceListModel));;
        }
Exemplo n.º 2
0
        // GET: /InvoiceList/
        public ActionResult Index()
        {
            PopulateSecurityExtended();
            int securityProfileId = SecurityExtended.SecurityProfileId;
            var permissionList    = _sharedFunctions.GetSecuritySettings(securityProfileId, (int)SecurityCatEnum.RequireService, null);

            InvoiceListModel invoiceListModel = new InvoiceListModel();

            invoiceListModel.DataTableMoveHistory      = new DataTable();
            invoiceListModel.DataTableEquipmentInfo    = new DataTable();
            invoiceListModel.DataTableEquipmentProduct = new DataTable();
            invoiceListModel.DataTableInvoiceHistory   = new DataTable();


            invoiceListModel.HfShowResult = "false";
            return(View(invoiceListModel));
        }
Exemplo n.º 3
0
        public ActionResult Search(InvoiceListModel postModel)
        {
            PopulateSecurityExtended();
            if (string.IsNullOrEmpty(postModel.TextSearch))
            {
                return(RedirectToAction("Index"));
            }

            InvoiceListModel invoiceListModel = new InvoiceListModel();

            int    locationId = SecurityExtended.LocationId.Value;
            string equipment  = postModel.TextSearch;

            invoiceListModel.DataTableMoveHistory      = GetTankMoveHistory(locationId, equipment, "");
            invoiceListModel.DataTableEquipmentInfo    = GetEquipmentInfo(equipment);
            invoiceListModel.DataTableEquipmentProduct = GetEquipmentProduct(equipment);
            invoiceListModel.DataTableInvoiceHistory   = GetInvoiceHistory(equipment);
            TempData["Equipment"]         = equipment;
            invoiceListModel.HfShowResult = "true";
            return(View("Index", invoiceListModel));
        }