Exemple #1
0
        public IHttpActionResult UpdateSubCategory([FromBody] SubCategoryUpdateModel subcategory)
        {
            var container = ContainerConfig.Configure();

            using (var scope = container.BeginLifetimeScope())
            {
                var app = scope.Resolve <ISubCategoryBusinessLayer>();

                var result = app.UpdateSubCategoryDetail(subcategory);

                return(Json(new { Result = result }));
            }
        }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sub"></param>
        /// <returns></returns>
        public string UpdateSubCategoryDetail(SubCategoryUpdateModel sub)
        {
            SubCategory subToUpdate = new SubCategory();

            subToUpdate.Id              = sub.Id;
            subToUpdate.CategoryID      = sub.CategoryId;
            subToUpdate.SubCategoryName = sub.SubCategoryName;
            subToUpdate.IsActive        = true;
            subToUpdate.UpdateUserName  = "******";
            subToUpdate.UpdateDttm      = DateTime.UtcNow;

            string result = _subCategoryDataAccess.UpdateSubCategoryDetails(subToUpdate);

            return(result);
        }