Ejemplo n.º 1
0
        //模块下面的产品更改保存
        public static int SaveProductTwo(SqlConnection connection, FlashSalesProductTwo flashsalesproducttwo)
        {
            var sqlParamters = new[] {
                new SqlParameter("@ProductName", flashsalesproducttwo.ProductName),
                new SqlParameter("@Label", flashsalesproducttwo.Label ?? string.Empty),
                new SqlParameter("@PKID", flashsalesproducttwo.PKID),
            };
            string sql = @" UPDATE  Activity..tbl_FlashSaleProducts
                            SET     ProductName = @ProductName ,
                                    Label = @Label
                            WHERE   PKID = @PKID";

            return(SqlHelper.ExecuteNonQuery(connection, CommandType.Text, sql, sqlParamters));
        }
        //更改模块下面的产品
        public int SaveProductTwo(FlashSalesProductTwo flashsalesproducttwo)
        {
            Func <SqlConnection, int> action = (connection) => DalFlashSalesTwo.SaveProductTwo(connection, flashsalesproducttwo);

            return(dbManager.Execute(action));
        }
 public string GetFristProduct(string activityid)
 {
     FlashSalesProductTwo model = manager.GetProListByFlashSalesID(activityid).FirstOrDefault();
     return model.PID;
 }
 public int SaveProductTwo(FlashSalesProductTwo flashsalesproducttwo)
 {
     return(handler.SaveProductTwo(flashsalesproducttwo));
 }