Пример #1
0
        public static void InsertOrder(POS_Order order)
        {
            string query =
                "BEGIN " +
                "order_pkg.insert_order('" + order.Description + "', '" + order.Place_Time.ToString(string.Format("dd/MMM/yyyy")) + "', " + order.Employee_ID + ", " + order.Bill + ", " + order.Discount_Rate + ", " + order.Other_Charges + ", " + order.Total_Bill + ", '" + order.CardNumber + "'); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
Пример #2
0
        private static POS_Order RowToEntity(DataRow row)
        {
            POS_Order order = new POS_Order
            {
                Id            = Int32.Parse(row["Id"].ToString()),
                Description   = row["Description"].ToString(),
                Place_Time    = Convert.ToDateTime(row["Place_Time"].ToString()),
                Employee_ID   = Int32.Parse(row["Employee_Id"].ToString()),
                Bill          = Convert.ToDouble(row["Bill"].ToString()),
                Discount_Rate = Convert.ToInt32(row["Discount_Rate"].ToString()),
                Other_Charges = Convert.ToDouble(row["Other_Charges"].ToString()),
                Total_Bill    = Convert.ToDouble(row["Total_Bill"].ToString()),
                CardNumber    = row["Card_Number"].ToString()
            };

            return(order);
        }