public ActionResult SaveCmnCurrency(CmnCurrency currency)
        {
            Operation objOperation = new Operation { Success = false };

            if (ModelState.IsValid)
            {
                int userId = Convert.ToInt32(Session["userId"].ToString());
                currency.CreatedBy = userId;
                if (currency.Id == 0)
                {
                    if ((bool)Session["Add"])
                    {
                        objOperation = _ccService.SaveCmnCurrency(currency);
                    }
                    else { objOperation.OperationId = -1; }
                }
                else
                {
                    if ((bool)Session["Edit"])
                    {
                        currency.ModifiedBy = userId;
                        objOperation = _ccService.UpdateCmnCurrency(currency);
                    }
                    else { objOperation.OperationId = -2; }
                }
            }

            return Json(objOperation, JsonRequestBehavior.DenyGet);
        }
        public Operation DeleteCmnCurrency(CmnCurrency objCmnCurrency)
        {
            Operation objOperation = new Operation { Success = true, OperationId = objCmnCurrency.Id };
            _CmnCurrencyRepository.Delete(objCmnCurrency);

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

                objOperation.Success = false;
            }
            return objOperation;
        }
        public Operation SaveCmnCurrency(CmnCurrency objCmnCurrency)
        {
            Operation objOperation = new Operation { Success = true };

            long Id = _CmnCurrencyRepository.AddEntity(objCmnCurrency);
            objOperation.OperationId = Id;

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