public static PaymentMethodsModel EntityToModel(this PaymentMethods entity, bool virtualActive = false)
        {
            try
            {
                PaymentMethodsModel model = new PaymentMethodsModel()
                {
                    Name=entity.Name,
                    IsActive = entity.IsActive,
                    Id = entity.Id
                };
                if (virtualActive)
                {
                    model.Sales = entity.Sales;

                }
                return model;
            }
            catch (Exception)
            {

                return new PaymentMethodsModel();
            }
        }
        public ActionResult PaymentMethodInsert(PaymentMethodsModel model)
        {
            if (ModelState.IsValid)
            {
                _servicePaymentMethods.Insert(model.ModelToEnity());
            }

            return RedirectToAction("PaymentMethodList");
        }
        public ActionResult PaymentMethodEdit(PaymentMethodsModel model)
        {
            if (ModelState.IsValid)
            {
                _servicePaymentMethods.Update(model.ModelToEnity(true));
            }

            return RedirectToAction("PaymentMethodList");
        }