예제 #1
0
 public static Boolean getByID(int PaymentID)
 {
     if (PaymentTypeRepo.getByID(PaymentID) == null)
     {
         return(false);
     }
     return(true);
 }
예제 #2
0
        public ActionResult Index()
        {
            CustomerRepo    customerRepo    = new CustomerRepo();
            ItemRepo        itemRepo        = new ItemRepo();
            PaymentTypeRepo paymentTypeRepo = new PaymentTypeRepo();

            var multiModels = new Tuple <IEnumerable <SelectListItem>, IEnumerable <SelectListItem>, IEnumerable <SelectListItem> >
                                  (customerRepo.GetAllCustomers(), itemRepo.GetAllItems(), paymentTypeRepo.GetAllPaymentTypes());

            return(View(multiModels));
        }
예제 #3
0
        public ActionResult Index()
        {
            CustomerRepo    objCustomerRepo    = new CustomerRepo();
            ItemRepo        objItemRepo        = new ItemRepo();
            PaymentTypeRepo objPaymentTypeRepo = new PaymentTypeRepo();

            var objMultipleModels = new Tuple <IEnumerable <SelectListItem>, IEnumerable <SelectListItem>, IEnumerable <SelectListItem> >
                                        (objCustomerRepo.GetAllCustomer(), objItemRepo.GetAllItem(), objPaymentTypeRepo.GetAllPaymentType());

            return(View(objMultipleModels));
        }
예제 #4
0
        public static Boolean checkPaymentTypeIsUnique(string Type)
        {
            PaymentType pt = PaymentTypeRepo.getByName(Type);

            if (pt != null)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
예제 #5
0
 public static void updatePaymentType(int id, string name)
 {
     PaymentTypeRepo.Update(id, name);
 }
예제 #6
0
 public static void createPaymentType(string name)
 {
     PaymentTypeRepo.Create(name);
 }
예제 #7
0
 public static PaymentType getPaymentTypeById(int id)
 {
     return(PaymentTypeRepo.GetPaymentTypeByID(id));
 }
예제 #8
0
 public static List <PaymentType> getAllPaymentType()
 {
     return(PaymentTypeRepo.GetPaymentType());
 }
예제 #9
0
 public static String getName(int ID)
 {
     return(PaymentTypeRepo.get(ID).Type);
 }
예제 #10
0
 public static int getLastPaymentTypeID()
 {
     return(PaymentTypeRepo.getLastPaymentTypeID());
 }
예제 #11
0
 public static void update(int ID, String type)
 {
     PaymentTypeRepo.update(ID, type);
 }
예제 #12
0
 public static void remove(int ID)
 {
     PaymentTypeRepo.remove(PaymentTypeRepo.get(ID));
 }
예제 #13
0
 public static void add(String type)
 {
     PaymentTypeRepo.add(PaymentTypeFactory.createPaymentType(type));
 }
예제 #14
0
 public static List <PaymentType> getAll()
 {
     return(PaymentTypeRepo.getAll());
 }
예제 #15
0
 public static int searchByName(string name)
 {
     return(PaymentTypeRepo.searchByName(name));
 }
예제 #16
0
 public static void deletePaymentType(int id)
 {
     PaymentTypeRepo.Delete(id);
 }
예제 #17
0
 public static PaymentType getPaymentbyName(string name)
 {
     return(PaymentTypeRepo.getPaymentbyName(name));
 }
 public PaymentTypeController(PaymentTypeRepo repository)
 {
     _repository = repository;
 }