예제 #1
0
 public static bool insertWorkers(APCEntities APCContext, string name, decimal salary)
 {
     if (name.Trim() != "")
     {
         Workers workers = new Workers();
         workers.Name = name;
         workers.Salary = salary;
         APCContext.AddToWorkers(workers);
         APCContext.SaveChanges();
         return true;
     }
     else
         return false;
 }
예제 #2
0
 public static bool insertWorkers(APCEntities APCContext, string name, decimal salary)
 {
     if (name.Trim() != "")
     {
         Workers workers = new Workers();
         workers.Name   = name;
         workers.Salary = salary;
         APCContext.AddToWorkers(workers);
         APCContext.SaveChanges();
         return(true);
     }
     else
     {
         return(false);
     }
 }