예제 #1
0
 private static Register_Employee Create(IDataRecord record, IEnumerable <Claim> claims)
 {
     return(new Register_Employee()
     {
         RegisterID = RegisterDA.GetRegister(Convert.ToInt32(record["RegisterID"]), claims),
         EmployeeID = EmployeeDA.GetEmployee(Convert.ToInt32(record["EmployeeID"]), claims),
         From = Convert.ToDateTime(record["FromTime"]),
         Until = Convert.ToDateTime(record["UntilTime"]),
     });
 }
예제 #2
0
        private static Sale Create(IDataRecord record, IEnumerable <Claim> claims)
        {
            Sale Verkoop = new Sale();

            Verkoop.ID         = Convert.ToInt32(record["ID"]);
            Verkoop.Timestamp  = Convert.ToDateTime(record["TimeOfSale"]);
            Verkoop.ProductID  = ProductDA.GetProduct(Convert.ToInt32(record["ProductID"]), claims);
            Verkoop.CustomerID = CustomerMADA.GetCustomer(Convert.ToInt32(record["CustomerID"]), claims);
            Verkoop.RegisterID = RegisterDA.GetRegister(Convert.ToInt32(record["RegisterID"]), claims);
            Verkoop.Amount     = Convert.ToInt32(record["Amount"]);
            Verkoop.Totalprice = Convert.ToDouble(record["TotalPrice"]);
            return(Verkoop);
        }