Пример #1
0
 public int AddController(CControlerModel ip_Model)
 {
     if (ip_Model.ACTIVITY_NAME == null || ip_Model.CONTROLLER_NAME == null || ip_Model.ACTIVITY_NAME == "" || ip_Model.CONTROLLER_NAME == "")
     {
         return 200;
     }
     else
     {
         UnitOfWork uow = new UnitOfWork();
         ip_Model.State = EDataState.Added;
         var v_bo_controll = ip_Model.CopyAs<HT_CONTROLLER>();
         uow.Repository<HT_CONTROLLER>().Insert(v_bo_controll);
         uow.Save();
         return 100;
     }
 }
Пример #2
0
 public void DeleteController(CControlerModel ip_Model)
 {
     UnitOfWork uow = new UnitOfWork();
     ip_Model.State = EDataState.Deleted;
     var v_bo_controll = ip_Model.CopyAs<HT_CONTROLLER>();
     uow.Repository<HT_CONTROLLER>().Update(v_bo_controll);
     uow.Save();
 }