Esempio n. 1
0
        //Function to get  GlobalCode for editing
        /// <summary>
        /// Edits the type of the global category code order.
        /// </summary>
        /// <param name="GlobalCodeCategoryId">The global code category identifier.</param>
        /// <returns></returns>
        public JsonResult EditGlobalCategoryCodeOrderType(int GlobalCodeCategoryId)
        {
            //Initialize the GlobalCode Bal
            var bal      = new GlobalCodeCategoryMasterBal();
            var m        = bal.GetGlobalCategoriesByGlobalCodeCategoryId(GlobalCodeCategoryId);
            var jsonData = new { m, SaveText = ResourceKeyValues.GetKeyValue("update") };

            return(Json(jsonData, JsonRequestBehavior.AllowGet));
        }
Esempio n. 2
0
        //Delete global code
        /// <summary>
        /// Deletes the global code category.
        /// </summary>
        /// <param name="globalCodeCategoryId">The global code category identifier.</param>
        /// <returns></returns>
        public ActionResult DeleteGlobalCodeCategory(int globalCodeCategoryId)
        {
            var bal = new GlobalCodeCategoryMasterBal();
            var m   = bal.GetGlobalCategoriesByGlobalCodeCategoryId(globalCodeCategoryId);

            m.IsDeleted   = true;
            m.DeletedBy   = Helpers.GetLoggedInUserId();
            m.DeletedDate = Helpers.GetInvariantCultureDateTime();
            var i = bal.AddUpdateGlobalCategory(m);

            return(PartialView(PartialViews.GlobalCodeCategoryMasterList, bal.GetAllGlobalCodeCategories()));
        }
Esempio n. 3
0
        //Function to get  GlobalCode for editing
        /// <summary>
        /// Edits the global category code.
        /// </summary>
        /// <param name="GlobalCodeCategoryId">The global code category identifier.</param>
        /// <returns></returns>
        public ActionResult EditGlobalCategoryCode(int GlobalCodeCategoryId)
        {
            //Initialize the GlobalCode Bal
            var globalCodeCategoryMasterBal = new GlobalCodeCategoryMasterBal();
            // var currentGCCMaster = globalCodeCategoryMasterBal.GetGlobalCategoriesByGlobalCodeCategoryId(GlobalCodeCategoryId);
            var facilityBal = new FacilityBal();
            var cId         = Helpers.GetDefaultCorporateId();
            var viewData    = new GlobalCodeCategoryMasterView
            {
                GCC = globalCodeCategoryMasterBal.GetGlobalCategoriesByGlobalCodeCategoryId(GlobalCodeCategoryId),
                //LstFacility = facilityBal.GetFacilities(cId)
            };

            return(PartialView(PartialViews.AddUpdateGlobalCodeCategoryMaster, viewData));
        }
Esempio n. 4
0
        //CPT
        #endregion

        public JsonResult BindOrderTypeCategories()
        {
            using (var bal = new GlobalCodeCategoryMasterBal())
            {
                var list = bal.GetOrderTypeCategoriesByFacility(Helpers.GetDefaultFacilityId(), Helpers.GetLoggedInUserId(), true);

                var jsonData = list.Select(a => new[] { Convert.ToString(a.GlobalCodeCategoryID), a.GlobalCodeCategoryName
                                                        , a.GlobalCodeCategoryValue, a.ExternalValue1, a.ExternalValue2, a.ExternalValue4, a.ExternalValue3 });

                var s = Json(jsonData, JsonRequestBehavior.AllowGet);
                s.MaxJsonLength  = int.MaxValue;
                s.RecursionLimit = int.MaxValue;
                return(s);
            }
        }
Esempio n. 5
0
        public int AddUpdateGlobalCodeCategory(GlobalCodeCategory m)
        {
            var bal = new GlobalCodeCategoryMasterBal();

            m.FacilityNumber = Convert.ToString(Helpers.GetDefaultFacilityId());
            if (m.GlobalCodeCategoryID > 0)
            {
                m.ModifiedBy   = Helpers.GetLoggedInUserId();
                m.ModifiedDate = Helpers.GetInvariantCultureDateTime();
            }
            else
            {
                m.CreatedBy   = Helpers.GetLoggedInUserId();
                m.CreatedDate = Helpers.GetInvariantCultureDateTime();
            }
            return(bal.AddUpdateGlobalCategory(m));
        }
Esempio n. 6
0
        /// <summary>
        /// Indexes this instance.
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            //Initialize the GlobalCode Bal
            using (var bal = new GlobalCodeCategoryMasterBal())
            {
                var viewData = new GlobalCodeCategoryMasterView
                {
                    GCC = new GlobalCodeCategory
                    {
                        IsActive       = true,
                        FacilityNumber = Convert.ToString(Helpers.GetDefaultFacilityId())
                    },
                    //Categories = bal.GetAllGlobalCodeCategories(),
                };

                return(View(viewData));
            }
        }
Esempio n. 7
0
        public ActionResult GetGlobalCodeCategoryList()
        {
            var bal = new GlobalCodeCategoryMasterBal();

            return(PartialView(PartialViews.GlobalCodeCategoryMasterList, bal.GetAllGlobalCodeCategories()));
        }