Example #1
0
            public static List <StockReal> sel(Guid IdEstablishment)
            {
                List <StockReal> r = new List <StockReal>();

                List <object[]> l = new ClassDB(null).queryResonse("SELECT * FROM StockReal WHERE Establishment_CustomerId='" + IdEstablishment + "'");

                r = ListObjToStockReal(l);

                return(r);
            }
Example #2
0
        public static Guid getProdCustomerId(string CodeBar)
        {
            string cmd = "SELECT CustumerId FROM Products WHERE CodeBare ='" + CodeBar + "'";

            List <object[]> o = new ClassDB(null).queryResonse(cmd);

            if (o.Count > 0)
            {
                return((Guid)o[0][0]);
            }
            else
            {
                return(Guid.Empty);
            }
        }
Example #3
0
        public static List <Establishment> sel()
        {
            List <object[]> l = new ClassDB(null).queryResonse("SELECT * FROM Establishment");

            List <Establishment> res_ = new List <Establishment>();

            foreach (var o in l)
            {
                Establishment res = new Establishment();
                res.CustomerId = (Guid)o[0];
                res.Type       = (int)o[1];
                res.Name       = (string)o[2];
                res.CP         = (string)o[3];
                res.Ville      = (string)o[4];
                res.Adresse    = (string)o[5];
                res.Phone      = (string)o[6];
                res.Mail       = (string)o[7];
                res_.Add(res);
            }
            return(res_);
        }