public Operation Delete(SlsProductPrice objSlsProductPrice)
        {
            Operation objOperation = new Operation { Success = true, OperationId = objSlsProductPrice.Id };
            _productPriceRepository.Delete(objSlsProductPrice);

            try
            {
                _unitOfWork.Commit();
            }
            catch (Exception)
            {

                objOperation.Success = false;
            }
            return objOperation;
        }
        public Operation Save(SlsProductPrice objSlsProductPrice)
        {
            Operation objOperation = new Operation { Success = true };

            long Id = _productPriceRepository.AddEntity(objSlsProductPrice);
            objOperation.OperationId = Id;

            try
            {
                _unitOfWork.Commit();
            }
            catch (Exception ex)
            {
                objOperation.Success = false;
            }
            return objOperation;
        }
        public ActionResult Save(SlsProductPrice productPrice)
        {
            int userId = Convert.ToInt32(Session["userId"]);
            Operation objOperation = new Operation { Success = false };

            if (ModelState.IsValid)
            {
                if (productPrice.Id == 0)
                {
                    if ((bool)Session["Add"])
                    {
                        productPrice.CreatedBy = userId;
                        productPrice.CreatedDate = DateTime.Now.Date;
                        productPrice.DeclarationDate = DateTime.Now.Date;
                        objOperation = _productPriceService.Save(productPrice);
                    }
                    else { objOperation.OperationId = -1; }

                }
                else
                {
                    if ((bool)Session["Edit"])
                    {
                        productPrice.ModifiedBy = userId;
                        productPrice.ModifiedDate = DateTime.Now.Date;
                        objOperation = _productPriceService.Update(productPrice);
                    }
                    else { objOperation.OperationId = -2; }
                }
            }

            return Json(objOperation, JsonRequestBehavior.DenyGet);
        }