Пример #1
0
        public void UpdateRow(int id, string column, string value)
        {
            string sql = $"UPDATE \"Customer\" SET \"{column}\" = \'{value}\' WHERE \"Customer\" = {id}";

            CommonDAO.ExecuteNonQuery(sql);
        }
Пример #2
0
        public void DeleteRow(int id)
        {
            string sql = $"DELETE FROM \"Customer\" WHERE \"CustomerID\" = {id}";

            CommonDAO.ExecuteNonQuery(sql);
        }
Пример #3
0
        public void CreateNewRow(Customer customer)
        {
            string sql = $"INSERT INTO \"Customer\" (\"FirstName\", \"LastName\", \"AddressStreet\", \"City\", \"Country\", \"ZipCode\") VALUES ({customer.FirstName},{customer.LastName}, {customer.AddressStreet}, {customer.City}, {customer.Country}, {customer.ZipCode})";

            CommonDAO.ExecuteNonQuery(sql);
        }
Пример #4
0
        public void CreateNewRow(Product product)
        {
            string sql = $"INSERT INTO \"Product\"(\"ProductName\", \"Quantity\", \"Price\") VALUES ({product.ProductName}, {product.Quantity}, {product.Price})";

            CommonDAO.ExecuteNonQuery(sql);
        }
Пример #5
0
        public void CreateNewRow(Order order)
        {
            string sql = $"INSERT INTO \"Order\" (\"CustomerID\", \"LoginName\", \"ProductID\", \"TotalSum\") VALUES ({order.CustomerID},{order.ProductID}, {order.TotalSum})";

            CommonDAO.ExecuteNonQuery(sql);
        }
Пример #6
0
        public void CreateNewRow(Account account)
        {
            string sql = $"INSERT INTO \"Account\" (\"CustomerID\", \"LoginName\", \"Password\", \"Email\") VALUES ({account.CustomerID},{account.Login}, {account.Password}, {account.Email})";

            CommonDAO.ExecuteNonQuery(sql);
        }