Esempio n. 1
0
 public order_serialized(DateTime date, int order_number, double total_cost, int total_discount, int number_of_people, order_info info)
 {
     order_date            = date;
     this.order_number     = order_number;
     this.total_cost       = total_cost;
     this.total_discount   = total_discount;
     this.number_of_people = number_of_people;
     this.info             = info;
 }
Esempio n. 2
0
 public order_serialized()
 {
     order_date       = DateTime.Today;
     order_number     = 0;
     total_cost       = 0;
     total_discount   = 0;
     number_of_people = 0;
     info             = null;
 }
Esempio n. 3
0
        order_serialized create_order(int order_number)
        {
            DataRow dr = ds.Tables["yachting"].Rows.Find(new object[] { order_number });//не находит по ключу!"!!!

            DataRow[]  row_info = dr.GetChildRows("info_yachting");
            order_info info     = new order_info((string)row_info[0]["ships_type"], (int)row_info[0]["team_id"], (DateTime)row_info[0]["date_begin"],
                                                 (DateTime)row_info[0]["date_end"], (int)row_info[0]["crew_number"], (string)row_info[0]["sails_type"]);
            order_serialized order = new order_serialized((DateTime)dr["order_date"], (int)dr["order_number"], (double)dr["total_cost"],
                                                          (int)dr["total_discount"], (int)dr["number_of_people"], info);

            return(order);
        }