public Ticket(string idTicket, DateTime dateCreated, BDE bde, Collection <BasketItem> productItems, User u, Account acc, float reduc)
 {
     this.IDTicket     = idTicket;
     this.DateCreated  = dateCreated;
     this.BDESale      = bde;
     this.ProductItems = productItems;
     this.SellerUser   = u;
     this.Account      = acc;
     this.Reduction    = reduc;
 }
Exemple #2
0
 public User(int id, string username, string name, BDE bde, string theme, string accent, string md5Password, bool isAdmin, Account acc)
 {
     this.id          = id;
     this.Username    = username;
     this.Name        = name;
     this.BDE         = bde;
     this.theme       = theme;
     this.accent      = accent;
     this.Md5password = md5Password;
     this.isAdmin     = isAdmin;
     this.Account     = acc;
 }
Exemple #3
0
 public override bool Equals(Object obj)
 {
     //Check for null and compare run-time types.
     if ((obj == null) || !this.GetType().Equals(obj.GetType()))
     {
         return(false);
     }
     else
     {
         BDE bde = (BDE)obj;
         return(this.ID == bde.ID);
     }
 }
Exemple #4
0
        public static Collection <BDE> getBDEList()
        {
            var              db      = new MySQLDatabase("SERVER=51.68.230.58;Port=8080;Database=bde;Uid=bdeUser;Pwd=412qIrJSUkM0;", "MySql.Data.MySqlClient");
            DataTable        dt      = db.Select("SELECT * FROM bde");
            Collection <BDE> bdeList = new Collection <BDE>();

            foreach (DataRow dr in dt.Rows)
            {
                BDE bde = new BDE(dr["name"].ToString(), dr["departement"].ToString());
                bdeList.Add(bde);
            }
            return(bdeList);
        }