Example #1
0
        /// <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);
        }
Example #2
0
        public IList <Bill> GetTop1000()
        {
            var result = default(IList <Bill>);

            var userDAC = new BillDAC();

            result = userDAC.Read();
            return(result);
        }
Example #3
0
        /// <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);
        }
Example #4
0
        /// <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);
        }
Example #5
0
        /// <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);
        }
Example #6
0
        /// <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);
        }