Пример #1
0
        /// <summary>
        /// 添加信息
        /// </summary>
        /// <param name="Delivery"></param>
        /// <returns></returns>
        public int AddDelivery(Delivery Delivery)
        {
            string sql  = CreateSqlString.InsertSqlString(Delivery);
            var    pars = CreateSqlString.SqlParameterArray(Delivery);

            return(SqlHelper.ExecuteNonquery(sql, CommandType.Text, pars));
        }
Пример #2
0
        /// <summary>
        /// 添加信息
        /// </summary>
        /// <param name="Appraise"></param>
        /// <returns></returns>
        public int AddAppraise(Appraise Appraise)
        {
            string sql  = CreateSqlString.InsertSqlString(Appraise);
            var    pars = CreateSqlString.SqlServerParameterArray(Appraise);

            return(SqlHelper.ExecuteNonquery(sql, CommandType.Text, pars));
        }
Пример #3
0
        /// <summary>
        /// 添加信息
        /// </summary>
        /// <param name="Product"></param>
        /// <returns></returns>
        public int AddProduct(Product Product)
        {
            //string sql = "insert into Product(ProductId,Title,CateId,MarketPrice,Price,Content,PostTime,Stock) values(@ProductId,@Title,@CateId,@MarketPrice,@Price,@Content,@PostTime,@Stock)";
            string sql  = CreateSqlString.InsertSqlString(Product);
            var    pars = CreateSqlString.SqlParameterArray(Product);

            //MySqlParameter[] pars = {
            //                    new MySqlParameter("@ProductId",MySqlDbType.VarChar,32),
            //                      new MySqlParameter("@Title",MySqlDbType.VarChar,32),
            //                                  new MySqlParameter("@CateId",MySqlDbType.VarChar,32),
            //                             new MySqlParameter("@MarketPrice",MySqlDbType.Decimal),
            //                             new MySqlParameter("@Price",MySqlDbType.Decimal),
            //                               new MySqlParameter("@Stock",MySqlDbType.Int32),
            //                               new MySqlParameter("@PostTime",MySqlDbType.DateTime),
            //                               new MySqlParameter("@Content",MySqlDbType.Text),
            //                      };
            //pars[0].Value = Product.ProductId;
            //pars[1].Value = Product.Title;
            //pars[2].Value = Product.CateId;
            //pars[3].Value = Product.MarketPrice;
            //pars[4].Value = Product.Price;
            //pars[5].Value = Product.Content;
            //pars[5].Value = Product.PostTime;
            //pars[7].Value = Product.Stock;
            return(SqlHelper.ExecuteNonquery(sql, CommandType.Text, pars));
        }
Пример #4
0
        /// <summary>
        /// 添加信息
        /// </summary>
        /// <param name="Orders"></param>
        /// <returns></returns>
        public int AddOrders(Orders Orders)
        {
            string sql  = CreateSqlString.InsertSqlString(Orders);
            var    pars = CreateSqlString.SqlServerParameterArray(Orders);

            return(SqlHelper.ExecuteNonquery(sql, CommandType.Text, pars));
        }
Пример #5
0
        /// <summary>
        /// 添加信息
        /// </summary>
        /// <param name="AdminUser"></param>
        /// <returns></returns>
        public int AddAdminUser(AdminUser AdminUser)
        {
            string sql  = CreateSqlString.InsertSqlString(AdminUser);
            var    pars = CreateSqlString.SqlParameterArray(AdminUser);

            return(SqlHelper.ExecuteNonquery(sql, CommandType.Text, pars));
        }