Example #1
0
        public static DAL.Recipt ReciptBackendToDal(Backend.Receipt r)
        {
            DAL.Recipt temp = new DAL.Recipt();

            temp.ID        = r.ID;
            temp.productID = r.product;
            temp.price     = r.price;
            temp.amount    = r.amount;
            return(temp);
        }
Example #2
0
        public static List <Receipt> ReciptDalToBackendList(List <Recipt> reciptSqlDB)
        {
            List <Backend.Receipt> list = new List <Backend.Receipt>();

            Backend.Receipt temp;
            foreach (DAL.Recipt t in reciptSqlDB)
            {
                temp = new Backend.Receipt(t.ID, t.productID, t.amount, t.price);
                list.Add(temp);
            }
            return(list);
        }
Example #3
0
 public Transaction(int transactionID, DateTime dateTime, Boolean is_a_return, Receipt receipt, string paymentsMethod)
 {
     this.transactionID = transactionID;
     this.dateTime      = dateTime;
     this.is_a_return   = is_a_return;
     this.receipt       = receipt;
     paymentMethod      = (PaymentMethod)Enum.Parse(typeof(PaymentMethod), paymentsMethod);
 }