Exemplo n.º 1
0
        public static void Add(string name)
        {
            MySQL mySQL = MySQL.getInstance();

            mySQL.TableName = tableName;
            mySQL.insert("name", "'" + name + "'");
        }
Exemplo n.º 2
0
        public static void Add(string name, Producer producer)
        {
            MySQL mySQL = MySQL.getInstance();

            mySQL.TableName = tableName;
            mySQL.insert("`name`, `id_producer`", string.Format("'{0}', '{1}'", name, producer.id));
        }
Exemplo n.º 3
0
        public static void Add(string name, string description, double price)
        {
            MySQL mySQL = MySQL.getInstance();

            mySQL.TableName = tableName;
            mySQL.insert("name, description, price", string.Format("'{0}', '{1}', '{2}'", name, description, price));
        }
Exemplo n.º 4
0
        public static void Add(string name)
        {
            MySQL mySQL = MySQL.getInstance();

            mySQL.TableName = tableName;
            mySQL.insert("`name`", string.Format("'{0}'", name));
        }
        public static void Add(
            Producer producer,
            PhoneType phoneType,
            OS os,
            ModelPhone modelPhone,
            string photoUrl,
            double price)
        {
            MySQL mySQL = MySQL.getInstance();

            mySQL.TableName = tableName;
            mySQL.insert("`id_producer`, `id_phone_type`, `id_os`, `id_model_phone`, `photo_url`, `price`",
                         string.Format("'{0}', '{1}', '{2}', '{3}', '{4}', '{5}'",
                                       producer.id, phoneType.id, os.id, modelPhone.Id, photoUrl, price));
        }
Exemplo n.º 6
0
        public static void Add(
            MobilePhone mobilePhone,
            Tariff tariff,
            string surname,
            string middleName,
            string firstName,
            bool sex,
            string photoUrl,
            string passportNubmer,
            string mobileNumber
            )
        {
            MySQL mySQL = MySQL.getInstance();

            mySQL.TableName = tableName;
            mySQL.insert(
                "`id_mobile_phone`, `id_tariff`, `name`, `middle_name`, `surname`, `sex`, `photo_url`, `passport_number`, `number_phone`",
                string.Format("'{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}'",
                              mobilePhone.id, tariff.id, firstName, middleName, surname, sex, photoUrl, passportNubmer, mobileNumber));
        }