示例#1
0
        public void Create(SelfStock stock)
        {
            var parameters = new IDataParameter[]
            {
                new MySqlParameter("@P_CODE", stock.Code),
                new MySqlParameter("@P_NAME", stock.Name),
                new MySqlParameter("@P_GROUPID",stock.GroupId),
                new MySqlParameter("@P_FOLLOWED", stock.Followed),
                new MySqlParameter("@P_HOLD", stock.Hold),
                new MySqlParameter("@P_DISPLAYORDER", stock.DisplayOrder),
                new MySqlParameter("@P_DESCRIPTION", stock.Description),
            };

            var returnCode = this.DbRequest.ExecuteNonQuery(this.ConnectionString, "P_STOCK_CREATE", parameters);
        }
示例#2
0
        public void Update(SelfStock selfStock)
        {
            var parameters = new IDataParameter[]
            {
                new MySqlParameter("@P_groupid",selfStock.GroupId),
                new MySqlParameter("@P_followed", selfStock.Followed),
                new MySqlParameter("@P_hold", selfStock.Hold),
                new MySqlParameter("@P_displayorder", selfStock.DisplayOrder),
                new MySqlParameter("@P_description", selfStock.Description),
                new MySqlParameter("@P_id", selfStock.Id),
            };

            var returnCode = this.DbRequest.ExecuteNonQuery(this.ConnectionString, "P_STOCK_UPDATE", parameters);
        }