public static Boolean getByID(int PaymentID) { if (PaymentTypeRepo.getByID(PaymentID) == null) { return(false); } return(true); }
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)); }
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)); }
public static Boolean checkPaymentTypeIsUnique(string Type) { PaymentType pt = PaymentTypeRepo.getByName(Type); if (pt != null) { return(false); } else { return(true); } }
public static void updatePaymentType(int id, string name) { PaymentTypeRepo.Update(id, name); }
public static void createPaymentType(string name) { PaymentTypeRepo.Create(name); }
public static PaymentType getPaymentTypeById(int id) { return(PaymentTypeRepo.GetPaymentTypeByID(id)); }
public static List <PaymentType> getAllPaymentType() { return(PaymentTypeRepo.GetPaymentType()); }
public static String getName(int ID) { return(PaymentTypeRepo.get(ID).Type); }
public static int getLastPaymentTypeID() { return(PaymentTypeRepo.getLastPaymentTypeID()); }
public static void update(int ID, String type) { PaymentTypeRepo.update(ID, type); }
public static void remove(int ID) { PaymentTypeRepo.remove(PaymentTypeRepo.get(ID)); }
public static void add(String type) { PaymentTypeRepo.add(PaymentTypeFactory.createPaymentType(type)); }
public static List <PaymentType> getAll() { return(PaymentTypeRepo.getAll()); }
public static int searchByName(string name) { return(PaymentTypeRepo.searchByName(name)); }
public static void deletePaymentType(int id) { PaymentTypeRepo.Delete(id); }
public static PaymentType getPaymentbyName(string name) { return(PaymentTypeRepo.getPaymentbyName(name)); }
public PaymentTypeController(PaymentTypeRepo repository) { _repository = repository; }