public ActionResult Add([ModelBinder(typeof(DevExpressEditorsBinder))]  PaymentInModel paymentInModel)
        {
            int userId = (int)Session["userId"];

            paymentInModel._UserId = (int)Session["userId"];
            paymentInService       = new PaymentInService();


            //if (ModelState.IsValid)
            //{
            long Id = 0;

            PaymentInNumbering_Mutex.wait();
            try
            {
                Id = paymentInService.Add(paymentInModel);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                PaymentInNumbering_Mutex.release();
            }
            paymentInModel           = paymentInService.GetById(userId, Id);
            paymentInModel._FormMode = Models.FormModeEnum.Edit;
            // paymentInModel = paymentInService.GetNewModel();
            //}
            //else
            //{
            //    string message = GetErrorModel();

            //    throw new Exception(string.Format("[VALIDATION] {0}", message));
            //}

            return(PartialView(VIEW_FORM_PARTIAL, paymentInModel));
        }
        public ActionResult Update([ModelBinder(typeof(DevExpressEditorsBinder))]  PaymentInModel paymentInModel)
        {
            int userId = (int)Session["userId"];

            paymentInModel._UserId   = (int)Session["userId"];
            paymentInService         = new PaymentInService();
            paymentInModel._FormMode = FormModeEnum.Edit;



            //if (ModelState.IsValid)
            //{
            paymentInService.Update(paymentInModel);
            paymentInModel = paymentInService.GetById(userId, paymentInModel.Id);
            //}
            //else
            //{
            //    string message = GetErrorModel();

            //    throw new Exception(string.Format("[VALIDATION] {0}", message));
            //}

            return(PartialView(VIEW_FORM_PARTIAL, paymentInModel));
        }