示例#1
0
        public void UpdateRow(int id, string column, string value)
        {
            string sql = $"UPDATE \"Order\" SET \"{column}\" = \'{value}\' WHERE \"OrderID\" = {id}";

            CommonDAO.ExecuteNonQuery(sql);
        }
示例#2
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);
        }
示例#3
0
        public void DeleteRow(int id)
        {
            string sql = $"DELETE FROM \"Order\" WHERE \"OrderID\" = {id}";

            CommonDAO.ExecuteNonQuery(sql);
        }
示例#4
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);
        }