/// <summary> /// Gets the bill of the selected user that matches with the current month /// </summary> /// <param name="user"></param> /// <param name="date"></param> /// <returns></returns> public Bill GetBillByUserAndMonth(int idUser, DateTime date) { var billDAC = new BillDAC(); var result = billDAC.GetBillByUserAndMonth(idUser, date); return(result); }
public IList <Bill> GetTop1000() { var result = default(IList <Bill>); var userDAC = new BillDAC(); result = userDAC.Read(); return(result); }
/// <summary> /// Obains the bill that match with the id /// </summary> /// <param name="id">Bill id to be searched</param> /// <returns></returns> public Bill GetById(int id) { Bill result = default(Bill); var billDAC = new BillDAC(); result = billDAC.ReadBy(id); return(result); }
/// <summary> /// Merge the information in the user (id) and bill to add a new bill /// </summary> /// <param name="user"></param> /// <param name="bill"></param> /// <returns></returns> public Bill Add(int idUser, Bill bill) { var result = default(Bill); var billDAC = new BillDAC(); bill.IdUser = idUser; result = billDAC.Create(bill); return(result); }
/// <summary> /// Deletes the bill that match with the id /// </summary> /// <param name="Id">Bill id to be deleted</param> public void Delete(int Id) { var billDAC = new BillDAC(); billDAC.Delete(Id); }
/// <summary> /// Edit the bill that match with the current id /// </summary> /// <param name="bill">Data to be edited</param> public void Edit(Bill bill) { var billDAC = new BillDAC(); billDAC.Update(bill); }