コード例 #1
0
 protected void Button1_Click1(object sender, EventArgs e)
 {
     HELPERS.WorkspaceCreate(HELPERS.NewOdbcConn(),
                             session.idSubprocess, session.idUser, IDeasetToClone,
                             TextBox1.Text);
     Response.Redirect("ListEWorkspaces.aspx");
 }
コード例 #2
0
        private void LoadProcesses()
        {
            IProcess engineProcess = new IProcess(HELPERS.NewOdbcConn());

            returnListProcess[] allprocs = engineProcess.ListProcess(null, "", new string[] { }, "c_u_Name asc");
            foreach (returnListProcess cur in allprocs)
            {
                if (cur.Name == "-")
                {
                    continue;
                }
                if (cur.Name.ToLower() == "(internal use)")
                {
                    continue;
                }
                ComponentArt.Web.UI.TreeViewNode rootNode = new ComponentArt.Web.UI.TreeViewNode();
                rootNode.Text         = cur.Name;
                rootNode.Expanded     = false;
                rootNode.ImageUrl     = "folder.gif";
                rootNode.ShowCheckBox = false;
                MEGATREE.Nodes.Add(rootNode);

                LoadSubProcesses(cur.ID, rootNode);
            }
        }
コード例 #3
0
        protected new void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);

            PANELcond_AbortUpload.Visible = false;
            PANELcond_AllowUpload.Visible = false;

            System.Data.Odbc.OdbcConnection conn = HELPERS.NewOdbcConn();
            // Is there a currently active ed workspace for this subprocess?\
            IEditingWorkspace engineWS = new IEditingWorkspace(conn);

            returnListEditingWorkspaceBySubProcess[] listWS =
                engineWS.ListEditingWorkspaceBySubProcess(null, session.idSubprocess);
            if (listWS.Length > 1)
            {
                throw new Exception("Internal error: more than one workspace for subprocess "
                                    + session.idSubprocess);
            }
            if (listWS.Length == 1)
            {
                // A workspace already exists for this subprocess.
                // If the WS owner matches this user, invite them to visit the WS.
                PANELcond_AbortUpload.Visible = true;
            }
            else
            {
                PANELcond_AllowUpload.Visible = true;
            }
        }
コード例 #4
0
ファイル: ListSAPWorkspaces.aspx.cs プロジェクト: dfsklar/RAF
        protected void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);

            PANELcond_InviteCreateWS.Visible     = false;
            PANELcond_Locked.Visible             = false;
            PANELcond_NewSubpr.Visible           = false;
            PANELcond_IsOwnerOfCurrentWS.Visible = false;

            System.Data.Odbc.OdbcConnection conn = HELPERS.NewOdbcConn();



            session.ObtainWorkspaceContext_SAP();


            if (session.idWorkspace_SAP >= 0)
            {
                // A workspace already exists for this subprocess.
                PANELcond_IsOwnerOfCurrentWS.Visible = session.isWorkspaceOwner_SAP;
                PANELcond_IsOwnerOfCurrentWS.Visible = !session.isWorkspaceOwner_SAP;
            }
            else
            {
                if (session.idActiveTASS_SAP >= 0)
                {
                    PANELcond_InviteCreateWS.Visible = true;
                }
                else
                {
                    PANELcond_NewSubpr.Visible = true;
                }
            }
        }
コード例 #5
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/html";
            OdbcConnection conn = HELPERS.NewOdbcConn();

            int IDsubpr = int.Parse(context.Request.Params["IDsubprocess"]);

            string linkedbusroles =
                " " + context.Request.Params["linkedbusroles"] + " ";

            IBusRole Ibr = new IBusRole(conn);

            context.Response.Write("<select ID='SELECTlinkedBRoles' multiple='multiple' class='geomfill2d'>");


            returnListBusRoleBySubProcess[] result =
                Ibr.ListBusRoleBySubProcess(null, "",
                                            new string[] {}, "c_u_Abbrev ASC", IDsubpr);

            foreach (returnListBusRoleBySubProcess brole in result)
            {
                context.Response.Write("<option ");
                if (linkedbusroles.Contains(" " + brole.Abbrev + " "))
                {
                    context.Response.Write("selected='1'");
                }
                context.Response.Write(">" + brole.Abbrev + "</option>");
            }
            context.Response.Write("</select>");
        }
コード例 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);

            PANELcond_AbortUpload.Visible = false;
            PANELcond_AllowUpload.Visible = false;

            System.Data.Odbc.OdbcConnection conn = HELPERS.NewOdbcConn();

            session.ObtainWorkspaceContext();

            if ((session.idWorkspace >= 0) && session.isWorkspaceOwner)
            {
                PANELcond_AllowUpload.Visible = true;
                PANELcond_AbortUpload.Visible = false;
            }
            else
            {
                PANELcond_AbortUpload.Visible = true;
                PANELcond_AllowUpload.Visible = false;
            }

            // This next line exposes a bug in WEB.UI:
            // If we do this, the selected index is LOCKED to 0.
            // If user changes the selection and then submits,
            // the selindex is still 0 from within the C# code.
            // This has to be conditionalized: not in a postback?
            if (!IsPostBack)
            {
                COMBOXchooseUnregEntAction.SelectedIndex = 0;
            }
        }
コード例 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);

            try
            {
                IDrole = int.Parse(this.Request.Params["RoleID"]);
                this.session.idRole = IDrole;
            }
            catch (Exception ex)
            {
                IDrole = this.session.idRole;
            }

            IBusRole IFACEbrole = new IBusRole(HELPERS.NewOdbcConn());

            brole = IFACEbrole.GetBusRole(IDrole);

            // We are now doing some sticky stuff so you can dive
            // into an old non-workspace EASet, and bounce up/down
            // without worrying about getting reset back to looking
            // at the workspace.
            //Session["INTcurWS"] = session.idWorkspace;


            Session["INTcurBUSROLE"] = session.idRole;
        }
コード例 #8
0
ファイル: Page_SAP_History.aspx.cs プロジェクト: dfsklar/RAF
        protected void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);

            PANELcond_InviteCreateWS.Visible     = false;
            PANELcond_Locked.Visible             = false;
            PANELcond_NewSubpr.Visible           = false;
            PANELcond_IsOwnerOfCurrentWS.Visible = false;
            PANELcond_MultWorkspaces.Visible     = false;

            try
            {
                session.ObtainWorkspaceContext_SAP();
            }
            catch (Exception ex)
            {
                if (ex.Message.Contains("more than one workspace"))
                {
                    PANELcond_MultWorkspaces.Visible = true;
                }
            }



            if (session.idWorkspace_SAP >= 0)
            {
                // A WORKSPACE ALREADY EXISTS FOR THIS SUBPROCESS.
                if (session.isWorkspaceOwner_SAP)
                {
                    if (PANELcond_MultWorkspaces.Visible == false)
                    {
                        PANELcond_IsOwnerOfCurrentWS.Visible = true;
                    }
                }
                else
                {
                    PANELcond_Locked.Visible = true;
                }
            }
            else
            {
                // Invite them to create a new workspace by cloning the
                // most recent locked EASet.

                ITcodeAssignmentSet engineWS = new ITcodeAssignmentSet(HELPERS.NewOdbcConn());

                returnListTcodeAssignmentSetBySubProcess[] listEAS =
                    engineWS.ListTcodeAssignmentSetBySubProcess
                        (null, "", new string[] {}, "c_u_tstamp DESC", session.idSubprocess);
                if (listEAS.Length == 0)
                {
                    PANELcond_NewSubpr.Visible = true;
                }
                else
                {
                    PANELcond_InviteCreateWS.Visible = true;
                }
            }
        }
コード例 #9
0
ファイル: PAGE_DictTcodes.aspx.cs プロジェクト: dfsklar/RAF
        private void Grid1_UpdateCommand(object sender, ComponentArt.Web.UI.GridItemEventArgs e)
        {
            GridItem theitem = e.Item;
            int      idRow   = int.Parse(theitem["c_id"] as string);

            ITcodeDictionary engine = new ITcodeDictionary(HELPERS.NewOdbcConn());

            engine.SetTcodeDescription(idRow, theitem["c_u_Description"] as string);
        }
コード例 #10
0
ファイル: Page_SAP_History.aspx.cs プロジェクト: dfsklar/RAF
        protected void LinkButton2_Click(object sender, EventArgs e)
        {
            SAP_HELPERS.WorkspaceCreate
                (HELPERS.NewOdbcConn(),
                session.idSubprocess, session.idUser, -1,
                "(Please edit this to describe this workspace)");

            this.Response.Redirect("Page_SAP_History.aspx", true);
        }
コード例 #11
0
        protected void Button1_Click1(object sender, EventArgs e)
        {
            int IDws =
                HELPERS.WorkspaceCreate(HELPERS.NewOdbcConn(),
                                        session.idSubprocess, session.idUser, IDeasetToClone,
                                        TextBox1.Text);

            session.idWorkspace = IDws;
            Response.Redirect("ListBRoles.aspx?WSID=" + IDws);
        }
コード例 #12
0
        public static void InitNewDB(OdbcConnection conn)
        {
            // Creates one process, one subpr, one user
            IProcess    Ipr    = new IProcess(conn);
            ISubProcess Isubpr = new ISubProcess(conn);
            IUser       Iuser  = new IUser(conn);

            int IDprocessCCM = HELPERS.FindProcess(conn, "CCM", true);
            int IDsubpr      = HELPERS.FindSubProcess(conn, IDprocessCCM, "Pricing", true);
            int IDuser       = HELPERS.FindUser(conn, "E16034", "David Sklar", true);
        }
コード例 #13
0
        private void UpdateDb(ComponentArt.Web.UI.GridItem item, string command)
        {
            IMVFormula   engine    = new IMVFormula(HELPERS.NewOdbcConn());
            IApplication engineApp = new IApplication(HELPERS.NewOdbcConn());

            switch (command)
            {
            case "INSERT":
                throw new Exception("Internal error PGMF#85; contact Sklar");
                break;


            case "UPDATE":

                //ADDED 3 JULY 2009: support for changing application name:
                string origname = item["origname"] as string;
                string newname  = item["c_u_Name"] as string;
                string newL4    = item["c_u_BOOLneedsLevel4"] as string;
                newname = newname.Trim();

                if (origname != newname)
                {
                    HELPERS.RenameApplication(HELPERS.NewOdbcConn(), origname, newname);
                }

                engineApp.SetApplication
                    (int.Parse(item["c_id"] as string), newname, newL4);

                if ((item["MVFID"] as string) == "")
                {
                    int newID = engine.NewMVFormula(item["c_u_Name"] as string);
                    engine.SetMVFormula(
                        newID,
                        item["c_u_Name"] as string,
                        null, null, null,
                        item["c_u_Formula"] as string);
                }
                else
                {
                    engine.SetMVFormula(
                        int.Parse(item["MVFID"] as string),

                        item["c_u_Name"] as string,
                        null, null, null,
                        item["c_u_Formula"] as string);
                }
                break;


            case "DELETE":
                throw new NotImplementedException();
                break;
            }
        }
コード例 #14
0
ファイル: Page_SAP_History.aspx.cs プロジェクト: dfsklar/RAF
        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            // Create a new workspace.
            ITcodeAssignmentSet Itaset = new ITcodeAssignmentSet(HELPERS.NewOdbcConn());
            int IDnewWS =
                Itaset.NewTcodeAssignmentSet(DateTime.Now, session.idSubprocess, session.idUser, "WORKSPACE");

            Itaset.SetTcodeAssignmentSet
                (IDnewWS, DateTime.Now, "Creation of new empty workspace", session.idSubprocess, session.idUser, "WORKSPACE");

            this.Response.Redirect("Page_SAP_History.aspx", true);
        }
コード例 #15
0
        // User wants to create a new subprocess
        protected void Button1_Click(object sender, EventArgs e)
        {
            if (!AuthCheck())
            {
                Server.Transfer("AuthFail.html");
                return;
            }


            int            IDprocess;
            OdbcConnection conn = HELPERS.NewOdbcConn();
            string         newname;
            string         processname;

            // New process or existing process?
            if (ChooserProcess.SelectedItem != null)
            {
                // Existing process!
                IDprocess   = int.Parse(ChooserProcess.SelectedItem.Value);
                processname = ChooserProcess.SelectedItem.Text;
            }
            else
            {
                IProcess Iprc = new IProcess(conn);
                newname     = ChooserProcess.Text.Trim();
                processname = newname;
                if (newname.Length < 2)
                {
                    throw new Exception("Name for new process is empty or too brief.");
                }
                IDprocess = Iprc.NewProcess(newname);
            }

            // Create the new subprocess

            ISubProcess Isprc = new ISubProcess(conn);

            newname = this.TextBox_NewSubprocess.Text.Trim();
            if (newname.Length < 2)
            {
                throw new Exception("Name for new subprocess is empty or too brief.");
            }
            int IDsubprocess = Isprc.NewSubProcess(newname, IDprocess);

            Isprc.SetSubProcess(IDsubprocess, newname, IDprocess, "Active");

            // New subprocess now created.  Record this with the session.
            LogInToSubprocess(IDsubprocess,
                              processname, newname);

            Response.Redirect("HOME.aspx");
        }
コード例 #16
0
ファイル: AFWACsession.cs プロジェクト: dfsklar/RAF
        public void LOG
            (string objtype, string action, int objID, string detail1, string detail2)
        {
            IEventLog engine       = new IEventLog(HELPERS.NewOdbcConn_FORCE());
            int       babylogentry =
                engine.NewEventLog
                    (DateTime.Now, this.idUser, this.strIPaddr,
                    action, objtype);

            engine.SetEventLog
                (babylogentry,
                DateTime.Now, this.idUser, this.strIPaddr,
                action, objID, detail1, detail2, objtype);
        }
コード例 #17
0
        public void Grid1_DeleteCommand(object sender, ComponentArt.Web.UI.GridItemEventArgs e)
        {
            int idTassToDel = int.Parse(e.Item["c_id"].ToString());

            try
            {
                IEntitlement engine = new IEntitlement(HELPERS.NewOdbcConn());
                engine.DeleteEntitlement(idTassToDel);
            }
            catch (Exception exxx)
            {
                throw new Exception("Deletion failed - this entitlement is in use in an assignment in at least one workspace.");
            }
        }
コード例 #18
0
        protected void REACTlaunchUpload(object sender, EventArgs e)
        {
            if (this.FileUpload2.HasFile)
            {
                string pathTempFolder = System.IO.Path.GetTempPath();
                string pathTempFile   = System.IO.Path.GetTempFileName();

                FileUpload2.SaveAs(pathTempFile);
                DataTable dt = HELPERS.LoadCsv(pathTempFolder,
                                               System.IO.Path.GetFileName(pathTempFile));
                if (dt != null)
                {
                    if (dt.Columns.Count >= 1)
                    {
                        System.Data.Odbc.OdbcConnection conn =
                            HELPERS.NewOdbcConn();

                        int subprVisibleToAll =
                            int.Parse(ConfigurationManager.AppSettings["IDsubprocessVisibleToALL"] as string);


                        Queue RETmsgs = SAP_HELPERS.ImportListSAProlenames(
                            conn,
                            dt,
                            this.session.idSubprocess);

                        if (RETmsgs.Count > 0)
                        {
                            string strMsgs = "";
                            foreach (object objMsg in RETmsgs.ToArray())
                            {
                                strMsgs += "\n" + objMsg.ToString();
                            }
                            TXTimportEngineMessages.Text = strMsgs;
                            DIVimportFeeback.Visible     = true;
                            DIVlaunchpad.Visible         = false;
                            //PANELcond_AllowUpload.Visible = false;
                        }
                        else
                        {
                            Response.Redirect("ListSAPRoles.aspx");
                        }

                        return;
                    }
                }
                throw new Exception("The SAP rolename list file does not appear to be a simple single-column, no-header list of SAP role names.");
            }
        }
コード例 #19
0
        private void _DEFUNCT_RecordChangeToRoleLink(int IDtass, int IDentit, GridItemEventArgs e)
        {
            ITcodeAssignment Itass
                = new ITcodeAssignment(HELPERS.NewOdbcConn());

            // Get the ID of the current SAP role linked via this TcodeAssignment obj
            returnGetTcodeAssignment prev = Itass.GetTcodeAssignment(IDtass);
            int prevID = prev.SAProleID;


            // NEW?
            int newID = int.Parse(SafeString(e.Item["SAProlename"]));

            if (prevID != newID)
            {
                /*
                 * IEventLog LOG = new IEventLog(HELPERS.NewOdbcConn());
                 * // 1. Log this change so we record the previous value.
                 * string action = "OrigTASSro";
                 * int IDlog = LOG.NewEventLog
                 * (DateTime.Now,
                 * this.session.idUser,
                 * this.Request.ServerVariables["REMOTE_ADDR"],
                 * action);
                 * LOG.SetEventLog
                 * (IDlog, DateTime.Now,
                 * this.session.idUser,
                 * this.Request.ServerVariables["REMOTE_ADDR"],
                 * action, IDtass, IDentit.ToString());
                 */
                throw new Exception("NOT IMPLEMENTED");
                // I BLIEVE THIS IS NOT UJSED ANYHMORE?


                // 2A. Make the actual change.

                /*
                 * returnGetTcodeAssignment theTass = Itass.GetTcodeAssignment(IDtass);
                 * Itass.SetTcodeAssignment
                 * (IDtass,
                 * theTass.TcodeAssignmentSetID,
                 * newID,
                 * theTass.TcodeEntitlementID,
                 * theTass.EditStatus | 8);
                 */

                //                DBrefresh();
            }
        }
コード例 #20
0
        // This is still in use, even with the new GUI, as of Oct2009
        private void Grid1_UpdateCommand(object sender, ComponentArt.Web.UI.GridItemEventArgs e)
        {
            int    idSubpr     = int.Parse(e.Item["c_id"] as string);
            int    idProcess   = int.Parse(e.Item["IdOfProcess"] as string);
            string nameSubpr   = e.Item["NameOfSubprocess"] as string;
            string namePr      = e.Item["NameOfProcess"] as string;
            string statusSubpr = e.Item["StatusOfSubprocess"] as string;
            string descrPr     = e.Item["DescrOfProcess"] as string;

            IProcess    engineProcess    = new IProcess(HELPERS.NewOdbcConn());
            ISubProcess engineSubProcess = new ISubProcess(HELPERS.NewOdbcConn());

            engineProcess.SetProcess(idProcess, namePr, descrPr);
            engineSubProcess.SetSubProcess(idSubpr, nameSubpr, idProcess, statusSubpr);
        }
コード例 #21
0
        public void OnBeforeCallback(object sender, EventArgs oArgs)
        {
            boolMustAbort   = false;
            MAPsubprToEASet =
                new Dictionary <int, HELPERS.infoEASet>();
            MAPbroleToSubproc =
                new Dictionary <int, int>();
            MAPbroleIdToName =
                new Dictionary <int, string>();

            QUEUEidsBusrolesToADD    = new Queue <int>();
            QUEUEidsBusrolesToREMOVE = new Queue <int>();
            engineBusRole            = new IBusRole(HELPERS.NewOdbcConn());
            engineEASet = new IEntAssignmentSet(HELPERS.NewOdbcConn());
            messages    = "";
        }
コード例 #22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);


            //return;  // Does the following code cause the JScript errrors?

            PANELcond_InviteCreateWS.Visible     = false;
            PANELcond_Locked.Visible             = false;
            PANELcond_NewSubpr.Visible           = false;
            PANELcond_IsOwnerOfCurrentWS.Visible = false;


            session.ObtainWorkspaceContext();

            if (session.idWorkspace >= 0)
            {
                // A WORKSPACE ALREADY EXISTS FOR THIS SUBPROCESS.
                if (session.isWorkspaceOwner)
                {
                    PANELcond_IsOwnerOfCurrentWS.Visible = true;
                }
                else
                {
                    PANELcond_Locked.Visible = true;
                }
            }
            else
            {
                // Invite them to create a new workspace by cloning the
                // most recent locked EASet.

                IEntAssignmentSet engineWS = new IEntAssignmentSet(HELPERS.NewOdbcConn());

                returnListEntAssignmentSetBySubProcess[] listEAS =
                    engineWS.ListEntAssignmentSetBySubProcess
                        (null, "", new string[] {}, "c_u_DATETIMElock DESC", session.idSubprocess);
                if (listEAS.Length == 0)
                {
                    PANELcond_NewSubpr.Visible = true;
                }
                else
                {
                    PANELcond_InviteCreateWS.Visible = true;
                }
            }
        }
コード例 #23
0
ファイル: ListEWorkspaces.aspx.cs プロジェクト: dfsklar/RAF
        protected void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);

            PANELcond_InviteCreateWS.Visible     = false;
            PANELcond_Locked.Visible             = false;
            PANELcond_NewSubpr.Visible           = false;
            PANELcond_IsOwnerOfCurrentWS.Visible = false;

            System.Data.Odbc.OdbcConnection conn = HELPERS.NewOdbcConn();
            // Is there a currently active ed workspace for this subprocess?\
            IEditingWorkspace engineWS = new IEditingWorkspace(conn);

            returnListEditingWorkspaceBySubProcess[] listWS =
                engineWS.ListEditingWorkspaceBySubProcess(null, session.idSubprocess);
            if (listWS.Length > 1)
            {
                throw new Exception("Internal error: more than one workspace for subprocess "
                                    + session.idSubprocess);
            }
            if (listWS.Length == 1)
            {
                // A workspace already exists for this subprocess.
                // If the WS owner matches this user, invite them to visit the WS.
                if (session.idUser == listWS[0].UserID)
                {
                    this.idActiveWS = listWS[0].ID;
                    PANELcond_IsOwnerOfCurrentWS.Visible = true;
                }
            }
            if (listWS.Length == 0)
            {
                IEntAssignmentSet engineEAS = new IEntAssignmentSet(conn);
                returnListEntAssignmentSetBySubProcess[] listEAS =
                    engineEAS.ListEntAssignmentSetBySubProcess
                        (null, "", new string[] {}, "c_u_DATETIMElock DESC", session.idSubprocess);
                if (listEAS.Length == 0)
                {
                    PANELcond_NewSubpr.Visible = true;
                }
                else
                {
                    PANELcond_InviteCreateWS.Visible = true;
                }
            }
        }
コード例 #24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            /*  EXample of how to avoid multiple init:
             *       if (!Page.IsPostBack && (!Grid1.CausedCallback)) {
             *       Grid1.DataBind();
             *       }
             */
            base.Page_Load(sender, e);

            this.Page.Title = "Business Entitlements - " + session.nameProcess + "/" + session.nameSubprocess;

            if (Request.QueryString.Get("ID") != null)
            {
                IDworkspace = int.Parse(Request.QueryString.Get("ID"));
            }
            else
            {
                IDworkspace = 10;
            }

            IEditingWorkspace         engine = new IEditingWorkspace(HELPERS.NewOdbcConn());
            returnGetEditingWorkspace ret    = engine.GetEditingWorkspace(IDworkspace);

            if (ret.ID != IDworkspace)
            {
                // There is no workspace with this ID!
                Context.Response.Redirect("ListEWorkspaces.aspx");
                return;
            }

            this.HIDDENidWS.Value = IDworkspace.ToString();

            if (GridCfg_Height.Text == "")
            {
                GridCfg_RowCnt.Text = "15";
                GridCfg_Height.Text = "400";
                //Grid1.GroupBy = "c_u_System";
            }

            SetGridViewMode_Scrolling();

            Site1 THEMASTER  = this.Master as Site1;
            Page  whatisthis = THEMASTER.Page;
        }
コード例 #25
0
        private void LoadSubProcesses(int idProc, TreeViewNode nodeProc)
        {
            ISubProcess engineProcess = new ISubProcess(HELPERS.NewOdbcConn());

            returnListSubProcessByProcess[] allprocs = engineProcess.ListSubProcessByProcess
                                                           (null, "\"Status\" = ?", new string[] { "Active" }, "c_u_Name asc", idProc);
            foreach (returnListSubProcessByProcess cur in allprocs)
            {
                ComponentArt.Web.UI.TreeViewNode rootNode = new ComponentArt.Web.UI.TreeViewNode();
                rootNode.Text               = cur.Name;
                rootNode.Expanded           = false;
                rootNode.ImageUrl           = "folder.gif";
                rootNode.ShowCheckBox       = true;
                rootNode.ID                 = "SP/" + cur.ID;
                rootNode.ContentCallbackUrl = "XMLtree_RolesInSubprocess.ashx?subproc=" + cur.ID;

                nodeProc.Nodes.Add(rootNode);
            }
        }
コード例 #26
0
ファイル: ListSAPWorkspaces.aspx.cs プロジェクト: dfsklar/RAF
        protected void ACTcreateBlankWorkspace(object sender, EventArgs e)
        {
            // For safety, re-check that there is not already a WS for this subpr.
            session.ObtainWorkspaceContext_SAP();
            if (session.idWorkspace_SAP >= 0)
            {
                throw new Exception("There is already a workspace for this subprocess.");
            }

            // Create a new workspace.
            ITcodeAssignmentSet Itaset = new ITcodeAssignmentSet(HELPERS.NewOdbcConn());
            int IDnewWS =
                Itaset.NewTcodeAssignmentSet(DateTime.Now, session.idSubprocess, session.idUser, "WORKSPACE");

            Itaset.SetTcodeAssignmentSet
                (IDnewWS, DateTime.Now, "Creation of new empty workspace", session.idSubprocess, session.idUser, "WORKSPACE");


            this.Response.Redirect("ListSAPWorkspaces.aspx", true);
        }
コード例 #27
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            if (this.FileUpload1.HasFile)
            {
                string pathTempFolder = System.IO.Path.GetTempPath();
                string pathTempFile   = System.IO.Path.GetTempFileName();

                FileUpload1.SaveAs(pathTempFile);

                IEASfileAttachment engine =
                    new IEASfileAttachment(HELPERS.NewOdbcConn_FORCE());
                int baby = engine.NewEASfileAttachment(
                    this.FileUpload1.FileName,
                    TXTcomment.Text, DateTime.Now,
                    this.session.idWorkspace);
                engine.UploadEASfileAttachmentContent
                    (baby, pathTempFile);
                Response.Redirect("PAGE_attachments.aspx?mode=success");
            }
        }
コード例 #28
0
        private bool AuthCheck()
        {
            if (AlreadyLoggedIn())
            {
                return(true);
            }


            int    IDuser      = int.Parse(this.CHOOSEusername.SelectedValue);
            string STRpassword = this.TXTpassword.Text.Trim();

            IUser         userfactory = new IUser(HELPERS.NewOdbcConn());
            returnGetUser userinfo    = userfactory.GetUser(IDuser);

            if
            (userinfo.EID.ToLower() ==
             STRpassword.ToLower())
            {
                //
                // LOGIN GOOD !
                //
                sessnew          = new AFWACsession(this.Request);
                sessnew.username = userinfo.Name;
                sessnew.idUser   = IDuser;

                // this extra session var UUIDSUBPROCESS is needed so data sources can use
                // it as parameters for scoping results.
                Session["AFWACSESSION"] = sessnew;
                Session["AFWACUSERID"]  = IDuser;

                Response.Redirect("SessionLOGIN.aspx");

                return(true);
            }
            else
            {
                this.PanelLoginFailMsg.Visible = true;
                return(false);
            }
        }
コード例 #29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);


            try
            {
                idSubPr = int.Parse(Request.Params["idsubr"]);
            }
            catch (Exception e2)
            {
                idSubPr = session.idSubprocess;
            }



            // Create lots of blank rows if not yet any rows for this subprocess.
            IMETADATA_SubprToActivityList engine = new IMETADATA_SubprToActivityList(HELPERS.NewOdbcConn());

            returnListMETADATA_SubprToActivityListBySubProcess[]
            retlist = engine.ListMETADATA_SubprToActivityListBySubProcess(null, idSubPr);
            if (retlist.Length == 0)
            {
                // AutoCreate lots of rows!
                for (int i = 0; i < 40; i++)
                {
                    int idBaby = engine.NewMETADATA_SubprToActivityList
                                     ("ACT", idSubPr);
                    engine.SetMETADATA_SubprToActivityList
                        (idBaby, (i + 1) * 1000, "ACT", false, "", "", "", idSubPr);
                }
            }


            DataView dv =
                (DataView)
                SqlDataSource1.Select(DataSourceSelectArguments.Empty);

            GridMain.DataSource = dv;
        }
コード例 #30
0
        protected void BTNloginReadOnly_Click(object sender, EventArgs e)
        {
            string eid        = this.TXTbusownereid.Text.Trim();
            IUser  engineuser = new IUser(HELPERS.NewOdbcConn());

            returnListUser[] ret =
                engineuser.ListUser(null, "\"EID\" like ?", new string[] { eid }, "");
            if (ret.Length != 1)
            {
                this.PanelReadOnlyLoginFailMsg.Visible = true;
                return;
            }
            if (ret.Length == 1)
            {
                Session["RAFLOGINbusOwnerEID"]       = eid;
                Session["RAFLOGINbusOwnerUserID"]    = ret[0].ID;
                Session["RAFLOGINbusOwnerNameFirst"] = ret[0].NameFirst;
                Response.Redirect("viewer/home.aspx");
                return;
            }
            throw new Exception("Database internal error code SESLG_230");
        }