Beispiel #1
0
        public void OpenConnection()
        {
            ccdLogin login = new ccdLogin();

            if (login.DoLogin())
            {
                try
                {
                    Session    = login.Session;
                    SysSession = new SCBWflSession();
                    SysSession.ConnectServer(Session.HostName, Session.PortNo);
                    SysSession.SystemLogin(c_APP_CODE, 0);
                }
                catch (Exception ex)
                {
                    Console.WriteLine("OpenDOMEA Session: " + ex.Message);
                    System.Environment.Exit(0);
                }
            }
            else
            {
                System.Environment.Exit(0);
            }
        }
Beispiel #2
0
        public frmMain()
        {
            InitializeComponent();
            assem         = typeof(frmMain).Assembly;
            Console.Title = assem.FullName;
            CCDGUI.ccdLogin login = new CCDGUI.ccdLogin();
            if (login.DoLogin())
            {
                try
                {
                    Console.WriteLine("\n...KONFIGURATION WIRD GELADEN...");
                    logger          = new Logger();
                    logger.Filename = string.Format("{0}{1}_{2}.csv", AppDomain.CurrentDomain.BaseDirectory, System.Diagnostics.Process.GetCurrentProcess().ProcessName, DateTime.Now.ToString("yyyyMMddhhmmss"));
                    Cursor.Current  = Cursors.WaitCursor;
                    sysSession      = new SCBWflSession();
                    sysSession.ConnectServer(login.Session.HostName, login.Session.PortNo);
                    sysSession.SystemLogin(APP_CODE, PRODUCT_ID);

                    lblDOMEAConnection.Text = sysSession.HostName + ";" + sysSession.PortNo;

                    ora = new OracleHelper(DomeaConfiguration.GetOracleConnectionString(sysSession));
                    ora.OpenConnection();

                    dgvBIG_FOLDER_RESTORE_TMP.DataSource = bindingSource1;

                    /*
                     * string stmt = "select distinct f.tmp_ID ID, g.igz, g.gz, f.wgnr, f.wgname, f.PFAD_GESAMT, f.folderbez, f.FOLDERNR, f.VATER_FOLDERBEZ, f.PATH STATUS " +
                     *          "from BIG_FOLDER_RESTORE_TMP f, gst g " +
                     *          "where f.foldernr >= 0 " +
                     *            "and g.gz = f.gz " +
                     *            "and f.wgnr = f.usernr " +
                     *          //"order by f.pfad_gesamt";
                     *          "order by f.tmp_ID";
                     *
                     * string stmt = "select distinct f.tmp_ID ID, g.igz, g.gz, f.wgnr, f.wgname, f.PFAD_GESAMT, f.PFAD, f.folderbez, f.FOLDERNR, f.VATER_FOLDERBEZ, f.PATH STATUS, " +
                     *                             "m.DESTINATION_ID, m.DESTINATION_NAME, m.DESTINATION_NAME || '\' || f.PFAD PFAD_NEU " +
                     *              "from BIG_FOLDER_RESTORE_TMP f, gst g, V_BIG_WORKGROUP_OLD_NEW m  " +
                     *              "where f.foldernr >= 0  " +
                     *              "and g.gz = f.gz  " +
                     *              "and f.wgnr = f.usernr  " +
                     *              "and m.source_id = f.wgnr " +
                     *              "order by f.tmp_ID";
                     */
                    string stmt = "select distinct f.tmp_ID ID, g.igz, g.gz, f.wgnr, f.wgname, f.PFAD_GESAMT, f.PFAD, f.folderbez, f.FOLDERNR, f.VATER_FOLDERBEZ, f.PATH STATUS, " +
                                  "m.DESTINATION_ID, m.DESTINATION_NAME, m.DESTINATION_NAME || '\\' || f.PFAD PFAD_NEU " +
                                  "from BIG_FOLDER_RESTORE_TMP f, gst g, V_BIG_WORKGROUP_OLD_NEW m  " +
                                  "where trim(f.path) is null " +    // nur solche die noch nicht verarbeitet wurden
                                  "and f.foldernr >= 0  " +
                                  "and g.gz = f.gz  " +
                                  "and f.wgnr = f.usernr  " +
                                  "and m.source_id = f.wgnr " +
                                  "order by f.tmp_ID";

                    //bindingSource1.DataSource = ora.GetData(stmt);

                    //dgvBIG_FOLDER_RESTORE_TMP.DataBindingComplete += new DataGridViewBindingCompleteEventHandler(dgvBIG_FOLDER_RESTORE_TMP_DataBindingComplete);

                    dgvBIG_FOLDER_RESTORE_TMP.DataSource = ora.GetData(stmt);

                    DataCount      = dgvBIG_FOLDER_RESTORE_TMP.Rows.Count;
                    Tab2Loaded     = false;
                    Cursor.Current = Cursors.Default;
                }
                catch (Exception ex)
                {
                    Cursor.Current = Cursors.Default;
                    MessageBox.Show(ex.Message);
                    this.Close();
                }
            }
            else
            {
                this.Close();
            }
        }