public static List<LoaiVoucherDTO> SelectAllLoaiVoucher() { List<LoaiVoucherDTO> listLKVDTO = new List<LoaiVoucherDTO>(); List<LoaiVoucher> listLKV = data.sp_LoaiVoucherXem().ToList(); foreach (LoaiVoucher dh in listLKV) { LoaiVoucherDTO dhdto = new LoaiVoucherDTO(dh); listLKVDTO.Add(dhdto); } return listLKVDTO; }
public static int InsertLoaiVoucher(LoaiVoucherDTO vc) { int kq = 0; try { data.sp_ins_loaivoucher(vc.MALOAIVOUCHER1, vc.TENLOAIVOUCHER1); data.SubmitChanges(); kq = 1; } catch (Exception ex) { } return kq; }
public static int UpdateLoaiVoucher(LoaiVoucherDTO vc) { return LoaiVoucherDAO.UpdateLoaiVoucher(vc); }
public static int InsertLoaiVoucher(LoaiVoucherDTO vc) { return LoaiVoucherDAO.InsertLoaiVoucher(vc); }