コード例 #1
0
        public static string GetOracleConnectionString(SCBWflSession sysSession)
        {
            SCBWflRows rows = sysSession.System.SQLCommand("select value from BIG_CONNECTION_STRING");

            foreach (SCBWflRow row in rows)
            {
                return(row.GetColumns().Item(1).ToString());
            }
            return("");
        }
コード例 #2
0
ファイル: Login.cs プロジェクト: sbegusch/Development
        public void DoLogin()
        {
            Util.WriteMethodInfoToConsole();
            ccdLogin Login = new ccdLogin();

            if (Login.DoLogin())
            {
                Console.WriteLine("--> Connected to DOMEA Server: " + Login.Session.HostName);
                LoginSession = Login.Session;
            }
        }
コード例 #3
0
 public void startWorkGroupSession(int workGroupID)
 {
     try
     {
         SCBWflWorkGroup wg = sysSession.System.GetWorkGroupByID(sysSession.System.NewIDByLocalKey(workGroupID));
         workGroupSession = sysSession.StartWorkGroupSession(wg);
     }
     catch (Exception ex)
     {
         workGroupSession = null;
     }
 }
コード例 #4
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);
            }
        }
コード例 #5
0
        public bool moveWorkItem(int igz, int workGroupID, int destFolderID, out string message)
        {
            message = "";
            try
            {
                if (igz > 0)
                {
                    SCBWflFolder folder = null;
                    if (allFolders.Count > 0)
                    {
                        folder = allFolders.Find(f => f.ID.ToLong(IDType.wflLocalKey) == destFolderID);
                    }
                    if (folder == null)
                    {
                        workGroupSession = getWorkGroupSession(workGroupID);
                        if (workGroupSession != null)
                        {
                            folder = FindFolder(workGroupSession.WorkList, destFolderID);
                            stopWorkGroupSession();
                            if (folder != null)
                            {
                                allFolders.Add(folder);
                            }
                        }
                        else
                        {
                            message = "WorkGroupSession is null: " + workGroupID;
                        }
                    }
                    if (folder != null)
                    {
                        //System.Windows.Forms.MessageBox.Show(folder.Name + " (" + folder.ID.ToLong(IDType.wflLocalKey) + ")" + " " + destFolderID);
                        Console.WriteLine(folder.Name + " (" + folder.ID.ToLong(IDType.wflLocalKey) + ")" + " " + destFolderID);

                        SCBWflProcessInstance pi = sysSession.System.GetProcessInstanceByID(sysSession.System.NewIDByLocalKey(igz));
                        SCBWflWorkItem        wi = pi.GetWorkItems().Item(1);
                        if (wi.GetCurrentActor().ID.ToLong(IDType.wflLocalKey) == workGroupID)
                        {
                            pi.SetLock(LockTypeOfProcInst.wflProcInstWhole);
                            wi.MoveToFolder(folder);
                            pi.ReleaseLock(LockTypeOfProcInst.wflProcInstWhole);
                            return(true);
                        }
                        else
                        {
                            message = "Aktueller Benutzer stimmt nicht mit Arbeitsgruppe überein! CurrentActor: " + wi.GetCurrentActor().ID.ToLong(IDType.wflLocalKey) + " WorkGroupID: " + workGroupID;
                            return(false);
                        }
                    }
                    else
                    {
                        return(false);
                    }
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("IGZ: " + igz + ": " + ex.Message);
                message = "IGZ: " + igz + ": " + ex.Message;
                return(false);
            }
        }
コード例 #6
0
 public DomeaHelper(SCBWflSession _sysSession)
 {
     sysSession = _sysSession;
     allFolders = new List <SCBWflFolder>();
 }
コード例 #7
0
ファイル: frmMain.cs プロジェクト: sbegusch/Development
        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();
            }
        }