Exemplo n.º 1
0
        /// <summary>
        ///  Gets default Index Page
        /// </summary>
        /// <returns>ActionResult.</returns>
        public virtual ActionResult Index(string id = null, bool disableAll = false)
        {
            ReceiptViewModel receiptViewModel = !string.IsNullOrEmpty(id) ? ControllerInternal.GetById(id, false, disableAll) : ControllerInternal.Create();

            //Added this make the optionalFields uncheck in UI
            receiptViewModel.Data.OptionalFields = 0;
            receiptViewModel.Attributes          = ControllerInternal.GetDynamicAttributesOfHeader();
            receiptViewModel.UserAccess          = ControllerInternal.GetAccessRights();
            ViewBag.UserAccess             = ControllerInternal.GetAccessRights();
            receiptViewModel.DisableScreen = disableAll;
            return(View(receiptViewModel));
        }
Exemplo n.º 2
0
        /// <summary>
        ///  Gets default Index Page
        /// </summary>
        /// <returns>ActionResult.</returns>
        public virtual ActionResult Index(string id = null, bool disableAll = false)
        {
            ReceiptViewModel receiptViewModel = !string.IsNullOrEmpty(id) ? ControllerInternal.GetById(id, false, disableAll) : ControllerInternal.Create();

            //Added this make the optionalFields uncheck in UI
            receiptViewModel.Data.OptionalFields = 0;
            receiptViewModel.Attributes          = ControllerInternal.GetDynamicAttributesOfHeader();
            receiptViewModel.UserAccess          = ControllerInternal.GetAccessRights();
            ViewBag.UserAccess             = ControllerInternal.GetAccessRights();
            receiptViewModel.DisableScreen = disableAll;

            //Define the grid here
            ViewBag.ReceiptDetailGrid          = ControllerInternal.CreateGridDefinitionAndPreference(GetGridJsonFilePath("receiptGrid"));
            ViewBag.RptOptionalFieldGrid       = ControllerInternal.CreateOptionalFieldGridDefinition("IC0595");
            ViewBag.RptDetailOptionalFieldGrid = ControllerInternal.CreateOptionalFieldGridDefinition("IC0585");

            return(View(receiptViewModel));
        }