public productObj update(productObj _data) { #region QuerySQL String _stQuery = String.Format (@" UPDATE systemProduct SET PRODUCT_NAME = @productName ,PRODUCT_PRICE = @productPrice ,PRODUCT_AMOUNT= @productAmont WHERE PRODUCT_ID = @productId "); #endregion QuerySQL gmjDatabase dbQuery = new gmjDatabase(); dbQuery.CommandText = _stQuery; dbQuery.CommandType = CommandType.Text; dbQuery.CommandTimeout = 240000; dbQuery.CreateParameter("productId", _data.productId); dbQuery.CreateParameter("productName", _data.productNome); dbQuery.CreateParameter("productPrice", _data.productPrice); dbQuery.CreateParameter("productAmont", _data.productAmount); dbQuery.ExecuteCommand(); return(_data); }
public orderObj update(orderObj _data) { #region QuerySQL String _stQuery = String.Format (@" UPDATE systemOrder SET USER_ID = @userId ,PRODUCT_ID = @productId WHERE ORDER_ID = @orderId "); #endregion QuerySQL gmjDatabase dbQuery = new gmjDatabase(); dbQuery.CommandText = _stQuery; dbQuery.CommandType = CommandType.Text; dbQuery.CommandTimeout = 240000; dbQuery.CreateParameter("orderId", _data.orderId); dbQuery.CreateParameter("userId", _data.userId); dbQuery.CreateParameter("productId", _data.productId); dbQuery.ExecuteCommand(); return(_data); }
public orderObj insert(orderObj _data) { #region QuerySQL String _stQuery = String.Format (@" INSERT INTO systemOrder ( USER_ID ,PRODUCT_ID ,ORDER_DATE ) VALUES ( @userId ,@productId ,GETDATE() ) "); #endregion QuerySQL gmjDatabase dbQuery = new gmjDatabase(); dbQuery.CommandText = _stQuery; dbQuery.CommandType = CommandType.Text; dbQuery.CommandTimeout = 240000; dbQuery.CreateParameter("userId", _data.userId); dbQuery.CreateParameter("productId", _data.productId); dbQuery.ExecuteCommand(); return(_data); }
public productObj insert(productObj _data) { #region QuerySQL String _stQuery = String.Format (@" INSERT INTO systemProduct ( PRODUCT_NAME ,PRODUCT_PRICE ,PRODUCT_AMOUNT ,PRODUCT_DATE ) VALUES ( @productName ,@productPrice ,@productAmont ,GETDATE() ) "); #endregion QuerySQL gmjDatabase dbQuery = new gmjDatabase(); dbQuery.CommandText = _stQuery; dbQuery.CommandType = CommandType.Text; dbQuery.CommandTimeout = 240000; dbQuery.CreateParameter("productName", _data.productNome); dbQuery.CreateParameter("productPrice", _data.productPrice); dbQuery.CreateParameter("productAmont", _data.productAmount); dbQuery.ExecuteCommand(); return(_data); }