Exemplo n.º 1
0
 public static bool insertCategory(APCEntities APCContext, string name)
 {
     if (name.Trim() != "")
     {
         Category category = new Category();
         category.Name = name;
         //category.ServiceCharge = serviceCharge;
         APCContext.AddToCategory(category);
         APCContext.SaveChanges();
         return true;
     }
     else
         return false;
 }
Exemplo n.º 2
0
 public static bool insertCategory(APCEntities APCContext, string name)
 {
     if (name.Trim() != "")
     {
         Category category = new Category();
         category.Name = name;
         //category.ServiceCharge = serviceCharge;
         APCContext.AddToCategory(category);
         APCContext.SaveChanges();
         return(true);
     }
     else
     {
         return(false);
     }
 }