/// <summary>
 /// Gets the global code categories.
 /// </summary>
 /// <returns></returns>
 public JsonResult GetRecordById(int id)
 {
     using (var bal = new GlobalCodeCategoryBal())
     {
         var current    = bal.GetCurrentCategoryById(id);
         var jsonResult = new
         {
             current.GlobalCodeCategoryID,
             current.GlobalCodeCategoryName,
             current.GlobalCodeCategoryValue,
             current.ExternalValue1
         };
         return(Json(jsonResult));
     }
 }
        /// <summary>
        /// Add / Edit the Current Global Code Category into the database
        /// </summary>
        /// <param name="gccId"></param>
        /// <returns>
        /// ID of newly added / updated GlobalCodeCategory
        /// </returns>
        public ActionResult DeleteRecord(int gccId)
        {
            using (var gccBal = new GlobalCodeCategoryBal())
            {
                var userId          = Helpers.GetLoggedInUserId();
                var currentDateTime = Helpers.GetInvariantCultureDateTime();
                var model           = gccBal.GetCurrentCategoryById(gccId);
                if (model.GlobalCodeCategoryID > 0)
                {
                    model.DeletedBy   = userId;
                    model.DeletedDate = currentDateTime;
                    model.IsDeleted   = true;
                    gccBal.AddUpdateGlobalCodeCategory(model);
                }

                var list = gccBal.GetListByCategoryValue(model.ExternalValue1);
                return(PartialView(PartialViews.LabTestOrderSetList, list));
            }
        }