예제 #1
0
        public static void ModifyResourceCategoryItemOrder(ResourceCategoryItem categoryItem)
        {
            using (var context = Exigo.Sql())
            {
                context.Execute(@"
               
                UPDATE ExigoWebContext.ResourceCategoryItems
                SET ItemOrder = @neworder
                WHERE ItemID = @itemid
                AND CategoryID = @categoryid

            ", new { neworder = categoryItem.ItemOrder, itemid = categoryItem.ItemID, categoryid = categoryItem.CategoryID });
            }
        }
예제 #2
0
        public static void CreateResourceCategoryItem(ResourceCategoryItem item)
        {
            using (var context = Exigo.Sql())
            {
                context.Execute(@"
                INSERT
                    ExigoWebContext.ResourceCategoryItems
                    (ItemID, CategoryID, ItemOrder)
                VALUES
                    (@itemid, @categoryid, @itemorder)

                ", new { itemid = item.ItemID, categoryid = item.CategoryID, itemorder = item.ItemOrder });
            }
        }