Exemplo n.º 1
0
 public void AddCategoryInfo(CategoryInfo categoryInfo)
 {
     try
     {
         object maxOrder = DataCollection.CategoryInfoInstance.GetFeildValue("max(order)", new Equal(MYDBLogic.AND, "cId", categoryInfo.cId.ToString()));
         categoryInfo.order = maxOrder != null ? Convert.ToInt32(maxOrder) + 1 : 1;
         DataCollection.CategoryInfoInstance.Insert(categoryInfo);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 2
0
 public void ChangeOrder(CategoryInfo categoryInfo1, CategoryInfo categoryInfo2)
 {
     try
     {
         int tmp = categoryInfo1.order;
         categoryInfo1.order = categoryInfo2.order;
         categoryInfo2.order = tmp;
         DataCollection.CategoryInfoInstance.Update(categoryInfo1);
         DataCollection.CategoryInfoInstance.Update(categoryInfo2);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 3
0
 public void RemoveCategoryInfo(CategoryInfo categoryInfo)
 {
     DataCollection.CategoryInfoInstance.Remove(categoryInfo);
 }
Exemplo n.º 4
0
 public void ModifyCategoryInfo(CategoryInfo categoryInfo)
 {
     DataCollection.CategoryInfoInstance.Update(categoryInfo);
 }