public Operation Delete(SlsProduct objSlsProduct)
        {
            Operation objOperation = new Operation { Success = true, OperationId = objSlsProduct.Id };
            _IChartOfProductRepository.Delete(objSlsProduct);

            try
            {
                _UnitOfWork.Commit();
            }
            catch (Exception)
            {
                objOperation.Success = false;
            }
            return objOperation;
        }
        public ActionResult Save(ChartOfProductViewModel objChartOfProductViewModel, int companyId = 1)
        {
            Operation objOperation = new Operation();
            userId = Convert.ToInt32(Session["userId"]);

            if (ModelState.IsValid)
            {
                SlsProduct objSlsProduct = new SlsProduct
                {
                    Id = objChartOfProductViewModel.Id,
                    Name = objChartOfProductViewModel.Name,
                    Code = objChartOfProductViewModel.Code,
                    IsProduct = objChartOfProductViewModel.IsProduct,
                    NoCredit = objChartOfProductViewModel.NoCredit,
                    SlsProductId = objChartOfProductViewModel.SlsProductId,
                    Level = objChartOfProductViewModel.Level,
                    Description = objChartOfProductViewModel.Description,
                    SecCompanyId = companyId,
                    CreatedBy = userId,
                    CreatedDate = DateTime.Now,
                    ModifiedBy = userId,
                    ModifiedDate = DateTime.Now
                };
                if (objSlsProduct.Id == 0)
                {
                    objOperation = _ChartOfProductService.Save(objSlsProduct);
                }
                else
                {
                    objOperation = _ChartOfProductService.Update(objSlsProduct);
                }
            }

            return Json(objOperation, JsonRequestBehavior.DenyGet);
        }
        public Operation Save(SlsProduct objSlsProduct)
        {
            Operation objOperation = new Operation { Success = true };

            int Id = _IChartOfProductRepository.AddEntity(objSlsProduct);
            objOperation.OperationId = Id;

            try
            {
                _UnitOfWork.Commit();
            }
            catch (Exception ex)
            {
                objOperation.Success = false;
            }

            return objOperation;
        }