Пример #1
0
        /*Funcion: obtiene los grupos de usuario
          Param:
          Return: Lista User Group
          */
        public List<UserGroupView> getUserGroup()
        {
            AccountDao Dao = new AccountDao();
            DataTable DaoResult = Dao.getUserGroup();
            List<UserGroupView> ViewList = new List<UserGroupView>();

            foreach (DataRow row in DaoResult.Rows)
            {
                UserGroupView x = new UserGroupView();
                if (DaoResult.Columns.Contains("UserGroupId") && row["UserGroupId"] != DBNull.Value) { x.UserGroupId = Convert.ToInt32(row["UserGroupId"]); }
                if (DaoResult.Columns.Contains("UserGroupName") && row["UserGroupName"] != DBNull.Value) { x.UserGroupName = row["UserGroupName"].ToString(); }

                ViewList.Add(x);
            }
            return ViewList;
        }
Пример #2
0
 /*Funcion: buscar cuentas por los datos seleccionados
   Param: dato a buscar
   Return: Lista cuentas
   */
 public List<AccountView> searchAccount(String partial)
 {
     AccountDao Dao = new AccountDao();
     DataTable DaoResult = Dao.searchAccount(partial);
     return buildAccount(DaoResult);
 }
Пример #3
0
 /*Funcion: inserta una nueva cuenta
   Param: accountInsertView
   Return: status
   */
 public CUDView insertAccount(AccountInsertView account)
 {
     AccountDao Dao = new AccountDao();
     String state = Dao.insertAccount(account);
     return CUDVerifyLogic.verifierInsertDeleteUpdate("insert", state);
 }
Пример #4
0
 public List<AccountView> getAccounts()
 {
     AccountDao Dao = new AccountDao();
     DataTable DaoResult = Dao.getAccount();
     return buildAccount(DaoResult);
 }
Пример #5
0
 /*Funcion: actualiza una cuenta
   Param: accountUpdateView
   Return: status
   */
 public CUDView updateAccount(AccoutUpdateView account)
 {
     AccountDao Dao = new AccountDao();
     String state = Dao.updateAccount(account);
     return CUDVerifyLogic.verifierInsertDeleteUpdate("update", state);
 }