public Operation Delete(SlsProductUnit objSlsProductUnit)
        {
            Operation objOperation = new Operation { Success = true, OperationId = objSlsProductUnit.Id };
            _ProductUnitRepository.Delete(objSlsProductUnit);

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

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

            long Id = _ProductUnitRepository.AddEntity(objSlsProductUnit);
            objOperation.OperationId = Id;

            try
            {
                _UnitOfWork.Commit();
            }
            catch (Exception ex)
            {
                objOperation.Success = false;
            }
            return objOperation;
        }
        public ActionResult Save(SlsProductUnit pu)
        {
            int userId = Convert.ToInt32(Session["userId"]);
             Operation objOperation = new Operation { Success = false };
             if (ModelState.IsValid)
             {
                 if (pu.Id == 0)
                 {
                     if ((bool)Session["Add"])
                     {
                         pu.CreatedBy = userId;
                         pu.CreatedDate = DateTime.Now;
                         objOperation = _ProductUnitService.Save(pu);
                     }
                     else { objOperation.OperationId = -1; }
                 }
                 else
                 {
                     if ((bool)Session["Edit"])
                     {
                         pu.ModifiedBy = userId;
                         pu.ModifiedDate = DateTime.Now;
                         objOperation = _ProductUnitService.Update(pu);
                     }
                     else { objOperation.OperationId = -2; }
                 }
             }

             return Json(objOperation, JsonRequestBehavior.DenyGet);
        }