Exemple #1
0
        public void addMirindaProduct(MirindaDTO invoiceMirindaDTO)
        {
            // databaseConnection.databaseOpenConnection();
            sqlConnection.Open();

            String update = " update Mirinda set Mda1L=" + invoiceMirindaDTO.M1L + ",Mda500ml=" + invoiceMirindaDTO.M500ML + ",Mda250mlPet=" + invoiceMirindaDTO.M250MLPET + ",Mda200mlGlass=" + invoiceMirindaDTO.M200MLGRB + ",Mda250mlCan=" + invoiceMirindaDTO.M250MLCAN + " where MdaID=" + id + " ";

            sqlCommand = new SqlCommand(update, sqlConnection);
            sqlCommand.ExecuteNonQuery();
            sqlConnection.Close();
        }
        public void addMirindaProductPrice(MirindaDTO invoiceMirindaDTO)
        {
            // databaseConnection.databaseOpenConnection();
            sqlConnection.Open();

            String update = " update MirindaPrice set Mda1Lp=" + invoiceMirindaDTO.M1L + ",Mda500mlp=" + invoiceMirindaDTO.M500ML + ",Mda250mlpetp=" + invoiceMirindaDTO.M250MLPET + ",Mda200mlglassp=" + invoiceMirindaDTO.M200MLGRB + ",Mda250mlcanp=" + invoiceMirindaDTO.M250MLCAN + " where MdaPriceID=" + id + " ";

            sqlCommand = new SqlCommand(update, sqlConnection);
            sqlCommand.ExecuteNonQuery();
            sqlConnection.Close();
        }