steinkrauz - Post a comment

> Recent Entries
> Archive
> Friends
> User Info

February 19th, 2015


[info]steinkrauz10:20 am - Pacepalm
40 аналитиков, 15 программистов, промышленная организация разработки ПО, ТЗ по ГОСТу...

Результат настолько прекрасен, что не нуждается в комментариях.
public static int getTypeOfDB(DMSession dmSession)
  {
    int type = 3;
    try
    {
      if (dmSession.getCurrentSite().toString().startsWith("stidb1")) {
        type = 0;
      } else if ((getDB(dmSession) == 6) || (getDB(dmSession) == 7)) {
        type = 2;
      } else if ((getDB(dmSession) == 11) || (getDB(dmSession) == 12)) {
        type = 3;
      } else if (((getDB(dmSession) == 4) || (getDB(dmSession) == 5)) && (getDB(dmSession) != 13) && (getDB(dmSession) != 14)) {
        type = 3;
      } else if (getDB(dmSession) == 9) {
        type = 4;
      } else if (getDB(dmSession) == 8) {
        type = 1;
      } else if ((getDB(dmSession) == 0) || (getDB(dmSession) == 1) || 
        (getDB(dmSession) == 13) || (getDB(dmSession) == 14)) {
        type = 5;
      } else if ((getDB(dmSession) == 2) || (getDB(dmSession) == 3) || 
        (getDB(dmSession) == 10) || 
        (getDB(dmSession) == 0) || (getDB(dmSession) == 1)) {
        type = 6;
      }
    }
    catch (Exception ex)
    {
      ex.printStackTrace();
    }

public static int getDB(DMSession dmSession)
  {
    int type = -1;
    try
    {
      dmSession.getCurrentSite().toString();
      String value_list = dmSession.getPreferenceService().getString(0, "KUPD_DB_type");
      if ((list_t == null) || (list_t.size() == 0))
      {
        list_t.put("DB_PC21_ZAI_WORK", Integer.valueOf(0));
        list_t.put("DB_PC21_ZAI_TEST", Integer.valueOf(1));
        list_t.put("DB_PC21_OKB_WORK", Integer.valueOf(2));
        list_t.put("DB_PC21_OKB_TEST", Integer.valueOf(3));
        list_t.put("DB_BISON_ZAI_WORK", Integer.valueOf(4));
        list_t.put("DB_BISON_ZAI_TEST", Integer.valueOf(5));
        list_t.put("DB_STIDB_ZAI_WORK", Integer.valueOf(6));
        list_t.put("DB_STIDB_ZAI_TEST", Integer.valueOf(7));
        list_t.put("DB_ICARUS_ZAI_TEST", Integer.valueOf(8));
        list_t.put("DB_ICARUS_ZAI_WORK", Integer.valueOf(9));
        list_t.put("DB_BISON144OKB_WORK", Integer.valueOf(10));
        list_t.put("DB_SU_ZAI_WORK", Integer.valueOf(11));
        list_t.put("DB_SU_ZAI_TEST", Integer.valueOf(12));
        list_t.put("DB_BISON144ZAI_WORK", Integer.valueOf(13));
        list_t.put("DB_BISON144ZAI_TEST", Integer.valueOf(14));
      }
      if (list_t.toString().contains(value_list)) {
        type = ((Integer)list_t.get(value_list)).intValue();
      } else if (!list_t.toString().contains(value_list)) {
        com.dmcenter.rac.util.MessageBox.post(Desktop.getActiveDesktop(), "Не найдено соответствующего типа для базы!", "Предупреждение", 2);
      }
    }
    catch (Exception ex)
    {
      ex.printStackTrace();
    }
    return type;
  }
return type; }
static HashMap<String, Integer> list_t = new HashMap();

Read Comments

Reply


From:
Identity URL: 
имя пользователя:    
Вы должны предварительно войти в LiveJournal.com
 
E-mail для ответов: 
Вы сможете оставлять комментарии, даже если не введете e-mail.
Но вы не сможете получать уведомления об ответах на ваши комментарии!
Внимание: на указанный адрес будет выслано подтверждение.
Username:
Password:
Subject:
No HTML allowed in subject
Message:



> Go to Top
LJ.Rossia.org