public string InsertUpdateProductCategory(ProductCategoryViewModel productCategoryVM) { try { AppUA appUA = Session["AppUA"] as AppUA; productCategoryVM.PSASysCommon = new PSASysCommonViewModel { CreatedBy = appUA.UserName, CreatedDate = _psaSysCommon.GetCurrentDateTime(), UpdatedBy = appUA.UserName, UpdatedDate = _psaSysCommon.GetCurrentDateTime(), }; var result = _productCategoryBusiness.InsertUpdateProductCategory(Mapper.Map <ProductCategoryViewModel, ProductCategory>(productCategoryVM)); return(JsonConvert.SerializeObject(new { Status = "OK", Record = result, Message = "Success" })); } catch (Exception ex) { AppConstMessage cm = _appConst.GetMessage(ex.Message); return(JsonConvert.SerializeObject(new { Result = "ERROR", Record = "", Message = cm.Message })); } }