Exemplo n.º 1
0
       public string insertUserType(UserType orduser)
       {
           TransactionManager transaction = null;
           try
           {
               transaction = DataRepository.Provider.CreateTransaction();
               transaction.BeginTransaction();

               orduser.IsActive = true;
               if (DataRepository.UserTypeProvider.Insert(orduser))
               {
                   // Show proper message
               }
               else
               {
                   return "Information could not be saved.";
               }
               transaction.Commit();
               return "Information Insert successfully.";
           }
           catch (Exception e)
           {
               transaction.Rollback();
               return "Information could not be saved.Please contact Administrator.";
           }
       }
Exemplo n.º 2
0
 public UserType GetUserTypeByID(int id)
 {
     objusertype = null;
     objusertype = DataRepository.UserTypeProvider.GetById(id);
     return objusertype;
 }