protected void DisplayNonPostback()
        {
            SetupPage();
            SessionManager.ClearReturns();

            try
            {
                RadPersistenceManager1.StorageProviderKey = SessionManager.UserContext.Person.PERSON_ID.ToString();
                RadPersistenceManager1.LoadState();
            }
            catch
            {
            }

            //if (SessionManager.ReturnStatus == null  ||  SessionManager.ReturnStatus != true)
            //if ( SessionManager.ReturnObject == null)
            SearchIncidents();                          // suppress list when invoking page from inbox

            Ucl_DocMgr ucl = (Ucl_DocMgr)this.Master.FindControl("uclDocSelect");

            if (ucl != null)
            {
                ucl.BindDocumentSelect("EHS", 2, true, true, "");
            }
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Master.HeadingMessage = "Inspection Release Note (IRN)";

            try
            {
                if (Session["IRN_SESSION"] != null)
                {
                    RadPersistenceManager1.LoadState();
                    itemsGrid.Rebind();
                }
            }
            catch (Exception ex)
            {
            }
        }
        if (!WebTools.UserInRole("PO_IRN_ADD"))
        {
            btnNew.Visible = false;
        }
        //if (!WebTools.UserInRole("IRN"))
        //{
        //   // Master.ShowError("Dont have access to this page");
        //      Response.Redirect("~/ErrorPages/NoAccess.htm");
        //    return;
        //}
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Master.HeadingMessage = "REQUEST FOR INSPECTION (PO RFI)";
         Master.AddModalPopup("~/Procurement/POInspAdd.aspx", btnNew.ClientID, 500, 600);
         Master.RadGridList = itemsGrid.ClientID;
     }
     if (!WebTools.UserInRole("PO_RFI_ADD"))
     {
         btnNew.Visible = false;
     }
     //if (!WebTools.UserInRole("POInsp"))
     //{
     //   // Master.ShowError("Dont have access to this page");
     //     Response.Redirect("~/ErrorPages/NoAccess.htm");
     //    return;
     //}
     try
     {
         if (Session["PO_RFI_SESSION"] != null)
         {
             RadPersistenceManager1.LoadState();
             itemsGrid.Rebind();
         }
     }
     catch (Exception ex)
     {
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Master.HeadingMessage = "Material Receive & Inspection (MRIR)";
            Master.AddModalPopup("~/Material/MatInspAdd.aspx", btnAdd.ClientID, 550, 850);
            Master.AddModalPopup("~/Material/MatInsp_View.aspx", btnView.ClientID, 600, 600);


            //   Master.AddModalPopup("~/Common/FileImport.aspx?TYPE_ID=11", btnPDFImport.ClientID, 600, 600);

            Master.RadGridList = grdMRIR.ClientID;
            try
            {
                if (Session["MatInsp_SESSION"] != null)
                {
                    RadPersistenceManager1.LoadState();
                    grdMRIR.Rebind();
                }
            }
            catch (Exception ex)
            {
            }
            if (!WebTools.UserInRole("MM_INSERT"))
            {
                btnAdd.Visible = false;
            }
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string filter_ = Session["MRIR_FILTER"].ToString();
         //    if (filter_ != "") txtSearch.Text = filter_;
         Master.HeadingMessage = "Material Receipt Report (MRR)";
         try
         {
             if (Session["MatReceive_SESSION"] != null)
             {
                 RadPersistenceManager1.LoadState();
                 MatReceiveGridView.Rebind();
             }
         }
         catch (Exception ex)
         {
         }
     }
     if (WebTools.UserInRole("MRR_IRN_VISIBLE"))
     {
         btnMrrIrnItems.Visible = true;
         return;
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Master.HeadingMessage = "Request For Inspection (RFI)";
            Master.AddModalPopup("~/Material/MatRFINew.aspx", btnNew.ClientID, 500, 750);
            Master.RadGridList = itemsGrid.ClientID;

            try
            {
                if (Session["MAT_RFI_SESSION"] != null)
                {
                    RadPersistenceManager1.LoadState();
                    itemsGrid.Rebind();
                }
            }
            catch (Exception ex)
            {
            }
            if (!WebTools.UserInRole("MM_INSERT"))
            {
                btnNew.Visible = false;
            }
        }
    }
Example #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Master.HeadingMessage = "PURCHASE ORDERS";
         try
         {
             if (Session["PO_SESSION"] != null)
             {
                 RadPersistenceManager1.LoadState();
                 itemsGrid.Rebind();
             }
         }
         catch (Exception ex)
         {
         }
     }
     if (!WebTools.UserInRole("PO_ADD"))
     {
         btnNewPO.Visible = false;
     }
     //if (!WebTools.UserInRole("POMaster"))
     //{
     //    Response.Redirect("~/ErrorPages/NoAccess.htm");
     //    return;
     //}
 }
Example #8
0
    protected void loadBtn_Click(object sender, EventArgs e)
    {
        string fileId = "CustomPersistenceSettingsKey";

        RadPersistenceManager1.StorageProviderKey = fileId;
        RadPersistenceManager1.LoadState();
        RadPivotGrid1.Rebind();
    }
Example #9
0
 protected void saveBtn_Click(object sender, EventArgs e)
 {
     try
     {
         RadPersistenceManager1.StorageProviderKey = "CustomPersistenceSettingsKey";
         RadPersistenceManager1.SaveState();
         Master.ShowSuccess("Saved");
     }
     catch (Exception ex)
     {
         Master.ShowError(ex.Message);
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Master.HeadingMessage = "ESD Report";
         try
         {
             if (Session["ESD_SESSION"] != null)
             {
                 RadPersistenceManager1.LoadState();
                 ReportsGridView.Rebind();
             }
         }
         catch (Exception ex)
         {
         }
     }
 }
Example #11
0
        protected void DisplayNonPostback()
        {
            SetupPage();

            try
            {
                RadPersistenceManager1.LoadState();
            }
            catch
            {
            }

            if (SessionManager.ReturnStatus == null || SessionManager.ReturnStatus != true)
            {
                //if ( SessionManager.ReturnObject == null)
                SearchAuditSchedulers();                      // suppress list when invoking page from inbox
            }
        }
Example #12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Master.HeadingMessage = "Material Catalog";
         Master.AddModalPopup("~/Material/MaterialStockRegister.aspx", btnRegister.ClientID, 550, 750);
         try
         {
             if (Session["CATLOG_SESSION"] != null)
             {
                 RadPersistenceManager1.LoadState();
                 itemsGrid.Rebind();
             }
         }
         catch (Exception ex)
         {
         }
     }
 }
        protected void DisplayNonPostback()
        {
            SetupPage();

            try
            {
                RadPersistenceManager1.StorageProviderKey = SessionManager.UserContext.Person.PERSON_ID.ToString();
                RadPersistenceManager1.LoadState();
            }
            catch
            {
            }

            if (SessionManager.ReturnStatus == null || SessionManager.ReturnStatus != true)
            {
                //if ( SessionManager.ReturnObject == null)
                SearchAudits();                      // suppress list when invoking page from inbox
            }
        }
    protected void rgRequests_ItemCommand(object source, GridCommandEventArgs e)
    {
        if (e.CommandName == "EditRequest")
        {
            try
            {
                //Save State
                bool saveStateEnabled = true;
                Session["saveStateEnabled"] = saveStateEnabled;
                string user = Session["userName"].ToString();
                SessionStorageProvider.StorageProviderKey = user;
                RadPersistenceManager1.SaveState();
            }
            catch (Exception ex)
            {
            }


            Response.Redirect("DiscoveryRequestForm.aspx?from=dt&requestID=" + e.CommandArgument);
        }
    }
Example #15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Master.HeadingMessage = "Material Requisition";

            Master.AddModalPopup("~/Procurement/MatRequistionAdd.aspx", btnAdd.ClientID, 450, 650);
            //Master.AddModalPopup("~/Procurement/MatRequisitionImport.aspx", btnImport.ClientID, 400, 600);
            Master.RadGridList = itemsGrid.ClientID;
            try
            {
                if (Session["MR_SESSION"] != null)
                {
                    RadPersistenceManager1.LoadState();
                    itemsGrid.Rebind();
                }
            }
            catch (Exception ex)
            {
            }
        }

        if (!WebTools.UserInRole("MR_ADD"))
        {
            btnAdd.Visible = false;
        }


        //if (!WebTools.UserInRole("MatRequisition"))
        //{
        //    Master.ShowError("Dont have access to this page");
        //    //  Response.Redirect("~/ErrorPages/NoAccess.htm");
        //    return;
        //}
        //string user = Session["USER_NAME"].ToString().ToLower();
        //string access_by = WebTools.GetExpr("ACCESS_BY", "USERS", " USER_NAME ='" + Session["USER_NAME"] + "'");
        //string all_records = WebTools.GetExpr("ALL_RECORDS", "USERS", " USER_NAME ='" + Session["USER_NAME"] + "'");
        //ACCESS_BY.Value = access_by;
        //ALL_RECORDS.Value = all_records;
    }
Example #16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Master.HeadingMessage = "Flange Management Torque Detail";
         if (!WebTools.UserInRole("FLANGE_TORQUE_INSERT"))
         {
             btnSave.Visible = false;
         }
     }
     try
     {
         if (Session["FLANGE_BASIC_SESSION"] != null)
         {
             RadPersistenceManager1.LoadState();
             FlangeGridView.Rebind();
         }
     }
     catch (Exception ex)
     {
     }
 }
Example #17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Master.HeadingMessage = "Manufacturing Batch Plan";
            Master.AddModalPopup("~/Procurement/POBatchCreate.aspx", btnCreate.ClientID, 620, 900);
            //   Master.AddModalPopup("~/Procurement/POBatchRevNew.aspx", btnRevision.ClientID, 600, 800);
            Master.AddModalPopup("~/Procurement/BatchItemsSearch.aspx", btnSearchItems.ClientID, 600, 1000);
            Master.RadGridList = itemsGrid.ClientID;

            try
            {
                if (Session["PoBatch_SESSION"] != null)
                {
                    RadPersistenceManager1.LoadState();
                    itemsGrid.Rebind();
                }
            }
            catch (Exception ex)
            {
            }
        }
    }
Example #18
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Master.HeadingMessage = "Material Transfer";
         try
         {
             if (Session["MTN_SESSION"] != null)
             {
                 RadPersistenceManager1.LoadState();
                 IssueGridView.Rebind();
             }
         }
         catch (Exception ex)
         {
         }
     }
     if (WebTools.UserInRole("MTN_RCVFLG_VISIBLE"))
     {
         btnRCVstatus.Visible = true;
         return;
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["userName"] == null || Session["appName"] == null)
            {
                Response.Redirect("Default.aspx");
            }

            //Restore State to Grid if there is something to restore
            try
            {
                string user = Session["userName"].ToString();
                SessionStorageProvider.StorageProviderKey = user;
                RadPersistenceManager1.LoadState();
                rgRequests.Rebind();
            }
            catch (Exception ex)
            {
            }



            //Role Based Viewing
            string userRole = Session["userRole"].ToString().ToLower();
            if (userRole == "admin" || userRole == "itadmin" || userRole == "itmanager")
            {
                //show delete column
                rgRequests.MasterTableView.GetColumn("DeleteLink").Visible = true;
            }
            else
            {
                //Hide delete column
                rgRequests.MasterTableView.GetColumn("DeleteLink").Visible = false;
            }
        }
    }
Example #20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Master.HeadingMessage = "Flange Management System Data";
            //Master.AddModalPopup("~/Home/FlangeSysPID.aspx", btnPIDnum.ClientID, 550, 800);

            if (!WebTools.UserInRole("FLANGE_SYSTEM_INSERT"))
            {
                btnSave.Visible = false;
            }
            try
            {
                string from = Request.UrlReferrer.ToString();
                string here = Request.Url.AbsoluteUri.ToString();

                if (from != here)
                {
                    Session["FlangeSYSTEMpage"] = Request.UrlReferrer.ToString();
                }
            }
            catch (Exception ex)
            {
            }
            try
            {
                if (Session["FLANGE_SYSTEM_SESSION"] != null)
                {
                    RadPersistenceManager1.LoadState();
                    FlangeGridView.Rebind();
                }
            }
            catch (Exception ex)
            {
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Master.HeadingMessage = "Expeditors Emails";

            if (!WebTools.UserInRole("EXPEDITORS_USER_REGISTER"))
            {
                ImageButtonAdd.Visible = false;
            }
            else
            {
                Master.AddModalPopup("~/Admin/UserNew.aspx", ImageButtonAdd.ClientID, 300, 500);
            }
            if (!WebTools.UserInRole("EXPEDITORS_EMAIL"))
            {
                btnSendMail.Visible = false;
            }
            if (WebTools.UserInRole("Admin"))
            {
                this.itemsGridView.Columns[0].Visible = true;
                return;
            }

            try
            {
                if (Session["EXPEDITORS_EMAILS_SESSION"] != null)
                {
                    RadPersistenceManager1.LoadState();
                    itemsGridView.Rebind();
                }
            }
            catch (Exception ex)
            {
            }
        }
    }
Example #22
0
        protected void DisplayNonPostback()
        {
            SetupPage();

            try
            {
                RadPersistenceManager1.LoadState();
            }
            catch
            {
            }

            if (SessionManager.ReturnStatus == null || SessionManager.ReturnStatus != true)
            {
                //if ( SessionManager.ReturnObject == null)
                SearchAudits();                      // suppress list when invoking page from inbox
            }
            Ucl_DocMgr ucl = (Ucl_DocMgr)this.Master.FindControl("uclDocSelect");

            if (ucl != null)
            {
                ucl.BindDocumentSelect("EHS", 2, true, true, "");
            }
        }
Example #23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Master.HeadingMessage = "Flange Management PID Data";

            if (!WebTools.UserInRole("FLANGE_PID_INSERT"))
            {
                btnSave.Visible = false;
            }
            try
            {
                string from = Request.UrlReferrer.ToString();
                string here = Request.Url.AbsoluteUri.ToString();

                if (from != here)
                {
                    Session["FlangePIDmainpage"] = Request.UrlReferrer.ToString();
                }
            }
            catch (Exception ex)
            {
            }
            try
            {
                if (Session["FLANGE_PIDmain_SESSION"] != null)
                {
                    RadPersistenceManager1.LoadState();
                    FlangeGridView.Rebind();
                }
            }
            catch (Exception ex)
            {
            }
        }
    }
Example #24
0
    protected void itemsGrid_PreRender(object sender, System.EventArgs e)
    {
        SessionStorageProvider.StorageProviderKey = "MR_SESSION";
        RadPersistenceManager1.SaveState();

        GridHeaderItem header = itemsGrid.MasterTableView.GetItems(GridItemType.Header)[0] as GridHeaderItem;

        foreach (GridColumn col in itemsGrid.MasterTableView.RenderColumns
                 .OfType <IGridDataColumn>().Where(x => x.AllowFiltering))
        {
            if (!string.IsNullOrEmpty(col.EvaluateFilterExpression()))
            {
                TableCell cell = header[col.UniqueName];
                cell.BackColor = System.Drawing.Color.SpringGreen;
                cell.Style["background-image"] = "none";

                cell.Controls.Add(new Image()
                {
                    ID = "FilterIndicator" + col.UniqueName,
                    //ImageUrl = "~/arrow.png"
                });
            }
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Master.HeadingMessage = "Material Request / Material Return";
         Master.RadGridList    = RadGrid1.ClientID;
         Master.AddModalPopup("~/Material/MaterialRequestRegister.aspx", btnAdd.ClientID, 450, 630);
         try
         {
             if (Session["MAT_REQ_SESSION"] != null)
             {
                 RadPersistenceManager1.LoadState();
                 RadGrid1.Rebind();
             }
         }
         catch (Exception ex)
         {
         }
         if (!WebTools.UserInRole("MM_INSERT"))
         {
             btnAdd.Visible = false;
         }
     }
 }
 protected void itemsGrid_PreRender(object sender, System.EventArgs e)
 {
     SessionStorageProvider.StorageProviderKey = "ESD_SESSION";
     RadPersistenceManager1.SaveState();
 }
 protected void itemsGridView_PreRender(object sender, EventArgs e)
 {
     SessionStorageProvider.StorageProviderKey = "EXPEDITORS_EMAILS_SESSION";
     RadPersistenceManager1.SaveState();
 }
Example #28
0
 protected void FlangeGridView_PreRender(object sender, EventArgs e)
 {
     SessionStorageProvider.StorageProviderKey = "FLANGE_BASIC_SESSION";
     RadPersistenceManager1.SaveState();
 }
Example #29
0
        protected void Page_PreRender(object sender, EventArgs e)
        {
            bool createAuditAccess = SessionManager.CheckUserPrivilege(SysPriv.originate, SysScope.audit);

            if (rbNew.Visible)
            {
                rbNew.Visible = createAuditAccess;
            }


            if (IsPostBack)
            {
                if (!uclAuditScheduleDetail.IsEditContext)
                {
                    RadPersistenceManager1.SaveState();
                }

                if (SessionManager.ReturnStatus == true)
                {
                    if (SessionManager.ReturnObject is string)
                    {
                        string type = SessionManager.ReturnObject as string;
                        switch (type)
                        {
                        case "DisplayAuditSchedules":
                            UpdateDisplayState(DisplayState.AuditScheduleList);
                            break;

                        case "Notification":
                            uclAuditScheduleDetail.EditAuditScheduleId = SessionManager.ReturnRecordID;
                            UpdateDisplayState(DisplayState.AuditScheduleEdit);
                            rbNew.Visible = false;
                            uclAuditScheduleDetail.EnableReturnButton(true);
                            break;

                        case "Closed":
                            uclAuditScheduleDetail.EditAuditScheduleId = SessionManager.ReturnRecordID;
                            UpdateDisplayState(DisplayState.AuditScheduleNew);
                            rbNew.Visible = false;
                            uclAuditScheduleDetail.EnableReturnButton(false);
                            break;
                        }
                    }
                    SessionManager.ClearReturns();
                }
            }
            else
            {
                if (SessionManager.ReturnStatus == true && SessionManager.ReturnObject is string)
                {
                    try
                    {
                        // from inbox
                        DisplayNonPostback();
                        SessionManager.ReturnRecordID = Convert.ToDecimal(SessionManager.ReturnObject.ToString());
                        SessionManager.ReturnObject   = "Notification";
                        SessionManager.ReturnStatus   = true;

                        StringBuilder       sbScript = new StringBuilder();
                        ClientScriptManager cs       = Page.ClientScript;

                        sbScript.Append("<script language='JavaScript' type='text/javascript'>\n");
                        sbScript.Append("<!--\n");
                        sbScript.Append(cs.GetPostBackEventReference(this, "PBArg") + ";\n");
                        sbScript.Append("// -->\n");
                        sbScript.Append("</script>\n");

                        cs.RegisterStartupScript(this.GetType(), "AutoPostBackScript", sbScript.ToString());
                    }
                    catch
                    {
                        // not a number, parse as type
                        DisplayNonPostback();
                    }
                }
                else
                {
                    DisplayNonPostback();
                }
            }
        }
Example #30
0
        protected void Page_PreRender(object sender, EventArgs e)
        {
            //bool uploadVideoAccess = SessionManager.CheckUserPrivilege(SysPriv.config, SysScope.media);
            //rbNew.Visible = uploadVideoAccess;


            if (IsPostBack)
            {
                RadPersistenceManager1.StorageProviderKey = SessionManager.UserContext.Person.PERSON_ID.ToString();
                RadPersistenceManager1.SaveState();

                if (SessionManager.ReturnStatus == true)
                {
                    if (SessionManager.ReturnObject is string)
                    {
                        string type = SessionManager.ReturnObject as string;
                        switch (type)
                        {
                        case "DisplayVideos":
                            UpdateDisplayState(DisplayState.VideoList);
                            break;

                        case "AddVideo":                                 // we added the video, now we want to go into edit mode
                        case "Notification":                             // this is when we select the video to edit from the list
                            uclVideoForm.EditVideoId = SessionManager.ReturnRecordID;
                            UpdateDisplayState(DisplayState.VideoEdit);
                            // need to determine if the Audit is past due and force it into display mode (probelm when coming from Calendar)
                            //string auditStatus = EHSAuditMgr.SelectAuditStatus(SessionManager.ReturnRecordID);
                            //if (auditStatus == "C")
                            //	UpdateDisplayState(DisplayState.AuditNotificationDisplay);
                            //else
                            //	UpdateDisplayState(DisplayState.AuditNotificationEdit);
                            //if (isDirected)
                            //{
                            //	rbNew.Visible = false;
                            //	uclAuditForm.EnableReturnButton(false);
                            //}
                            break;

                        case "DisplayOnly":
                            uclVideoForm.EditVideoId = SessionManager.ReturnRecordID;
                            UpdateDisplayState(DisplayState.VideoDisplay);
                            //if (isDirected)
                            //{
                            //	rbNew.Visible = false;
                            //	uclAuditForm.EnableReturnButton(false);
                            //}
                            break;
                        }
                    }
                    SessionManager.ClearReturns();
                }
            }
            else
            {
                //Ucl_DocMgr ucl = (Ucl_DocMgr)this.Master.FindControl("uclDocSelect");
                //if (ucl != null)
                //{
                //	ucl.BindDocumentSelect("EHS", 2, true, true, "");
                //}

                if (SessionManager.ReturnStatus == true && SessionManager.ReturnObject is string)
                {
                    try
                    {
                        // from inbox
                        DisplayNonPostback();
                        SessionManager.ReturnRecordID = Convert.ToDecimal(SessionManager.ReturnObject.ToString());
                        SessionManager.ReturnObject   = "Notification";
                        SessionManager.ReturnStatus   = true;
                        //isDirected = true;

                        StringBuilder       sbScript = new StringBuilder();
                        ClientScriptManager cs       = Page.ClientScript;

                        sbScript.Append("<script language='JavaScript' type='text/javascript'>\n");
                        sbScript.Append("<!--\n");
                        sbScript.Append(cs.GetPostBackEventReference(this, "PBArg") + ";\n");
                        sbScript.Append("// -->\n");
                        sbScript.Append("</script>\n");

                        cs.RegisterStartupScript(this.GetType(), "AutoPostBackScript", sbScript.ToString());
                    }
                    catch
                    {
                        // not a number, parse as type
                        DisplayNonPostback();
                    }
                }
                else
                {
                    DisplayNonPostback();
                }
            }
        }