示例#1
0
 protected void RMResident_ItemClick(object sender, RadMenuEventArgs e)
 {
     if (e.Item.Text == "Information Board")
     {
         Response.Redirect("Information_Board.aspx");
     }
     if (e.Item.Text == "Vacant")
     {
         Response.Redirect("Vacants.aspx");
     }
     if (e.Item.Text == "Staff & Others")
     {
         Response.Redirect("StaffandOthers.aspx");
     }
     if (e.Item.Text == "Owners Away")
     {
         Response.Redirect("OwnersAway.aspx");
     }
     if (e.Item.Text == "Previous Tenants")
     {
         Response.Redirect("PreviousTenants.aspx");
     }
     if (e.Item.Text == "Living Alone")
     {
         Response.Redirect("SAlone.aspx?Value1=" + 2);
     }
     if (e.Item.Text == "Profile ++")
     {
         Response.Redirect("ProfilePP.aspx");
     }
     if (e.Item.Text == "Residents")
     {
         Response.Redirect("ResidentAdd.aspx");
     }
 }
示例#2
0
 protected void SaveTemplateFileProxy(object sender, RadMenuEventArgs e)
 {
     if (String.IsNullOrEmpty(re_template.Content.Trim()))
     {
         Util.PageMessageAlertify(this, "Cannot save a blank template!", "Oops");
     }
     else
     {
         String Type = e.Item.Value;
         hf_new_file_type.Value = Type.Replace("New", String.Empty);
         if (Type.Contains("New"))
         {
             String onok =
                 "$get('" + hf_new_filename.ClientID + "').value=value; " +
                 "$get('" + hf_new_file_type.ClientID + "').value='" + hf_new_file_type.Value + "'; " +
                 "$get('" + btn_save_template_ok.ClientID + "').click();";
             Util.PageMessagePrompt(this, "Please enter a file name..", "My Template", onok, String.Empty, "Specify a name..");
         }
         else
         {
             if (String.IsNullOrEmpty(hf_filename.Value))
             {
                 Util.PageMessageAlertify(this, "You have no template loaded to save!", "Oops");
             }
             else if (hf_filename.Value.Trim().Length > 100)
             {
                 Util.PageMessageAlertify(this, "Filename is too long!", "Oops");
             }
             else
             {
                 SaveTemplateFile(null, null);
             }
         }
     }
 }
示例#3
0
 protected void RadMenuContextual_ItemClick(object sender, RadMenuEventArgs e)
 {
     try
     {
         if (e.Item.Value.Equals("ROLES"))
         {
             string idUsuario = rgUsuarios.MasterTableView.GetSelectedItems()[0].GetDataKeyValue("Usuario_sistema").ToString();
             MostrarRolesAsignados(idUsuario);
         }
         else if (e.Item.Value.Equals("PERMISOS"))
         {
             string idUsuario = rgUsuarios.MasterTableView.GetSelectedItems()[0].GetDataKeyValue("Usuario_sistema").ToString();
             MostrarPermisosAsignados(idUsuario, true);
         }
         else if (e.Item.Value.Equals("RESET"))
         {
             string idUsuario = rgUsuarios.MasterTableView.GetSelectedItems()[0].GetDataKeyValue("Usuario_sistema").ToString();
             ResetPass(idUsuario);
         }
         else if (e.Item.Value.Equals("EDITAR"))
         {
             string idUsuario = rgUsuarios.MasterTableView.GetSelectedItems()[0].GetDataKeyValue("Usuario_sistema").ToString();
             GetInfoUsuario(idUsuario);
         }
     }
     catch (Exception ex)
     {
         Master.MostrarMensajeError(ex.Message);
     }
 }
示例#4
0
 protected void RMSettings_ItemClick(object sender, RadMenuEventArgs e)
 {
     if (e.Item.Text == "Admin")
     {
         Response.Redirect("Admin.aspx");
     }
     if (e.Item.Text == "Profile ++ LookUp")
     {
         Response.Redirect("AttribLkUpAdd.aspx");
     }
     if (e.Item.Text == "Item Master")
     {
         Response.Redirect("ItemMaster.aspx");
     }
     if (e.Item.Text == "User Management")
     {
         Response.Redirect("~/UserManagement.aspx");
     }
     if (e.Item.Text == "Villa Master")
     {
         Response.Redirect("~/VillaMaster.aspx");
     }
     if (e.Item.Text == "Assets")
     {
         Response.Redirect("~/Assets.aspx");
     }
 }
    private void ToggleTypeProxy(object sender, RadMenuEventArgs e)
    {
        RadContextMenu rcm            = (RadContextMenu)sender;
        ImageButton    imbtn_filetype = (ImageButton)rcm.Parent.FindControl(e.Item.Value);

        ToggleFileType(imbtn_filetype, null);
    }
示例#6
0
        protected void RadMenuRequestTypes_ItemClick(object sender, RadMenuEventArgs e)
        {
            var requestTypeId  = e.Item.Value.ConvertToLong();
            var requestManager = new RequestManager();

            if (e.Item.Items.Count() > 0)
            {
                labelRequestType.Text = "لطفا از سطح آخر منو انتخاب نمایید!";
                return;
            }

            HiddenFieldRequestTypeId.Value = requestTypeId.ToString();

            labelRequestType.Text = requestManager.GetCurrentClickedRequestType(requestTypeId);
            RequestTypeId.Text    = labelRequestType.Text;

            var requestType = _requestTypeManager.FirstOrDefault(p => p.RequestTypeID == requestTypeId);

            if (requestType != null && requestType.IsAssetNummberNeed == true)
            {
                assetCode.Visible      = true;
                assetCode.Text         = requestType.AssetNummberMessage;
                needsAsset.Text        = requestType.AssetNummberMessage + " را وارد کنید";
                needsAsset2.Text       = needsAsset.Text;
                txtAssetNumber.Visible = true;
            }
            else
            {
                assetCode.Visible      = false;
                assetCode.Text         = "";
                needsAsset.Text        = "";
                needsAsset2.Text       = "";
                txtAssetNumber.Visible = false;
            }
        }
        protected void RadMenu_reportes_ItemClick(object sender, RadMenuEventArgs e)
        {
            int    servicio;
            string Canal;


            RadMenuItem miItem = new RadMenuItem();

            miItem = (RadMenuItem)e.Item;

            DataTable dt = null;

            if (miItem.Level == 3)
            {
                int id_menu = Convert.ToInt32(RadMenu_reportes.SelectedValue.ToString());

                dt = oCoon.ejecutarDataTable("UP_WEBXPLORA_GEN_MENU_OBTENER_MENU_BY_IDMENU", id_menu);

                servicio = Convert.ToInt32(dt.Rows[0]["cod_Strategy"].ToString());
                Canal    = dt.Rows[0]["cod_Channel"].ToString();

                this.Session["Service"] = servicio;
                this.Session["Canal"]   = Canal;

                string url = dt.Rows[0]["url"].ToString();

                Response.Redirect(url, true);
            }
        }
示例#8
0
        //点击菜单项
        protected void RadMenu_First_OnItemClick(object sender, RadMenuEventArgs e)
        {
            RadPanelBar_LeftMenu.Items.Clear();
            var moduleInfos = ModulePageList;

            LoadCurrentPages(moduleInfos.Where(ent => ent.ParentID == e.Item.Value.ToString().ToGuid()));
        }
示例#9
0
        protected void rgSearchResults_ItemClick(object sender, RadMenuEventArgs e)
        {
            RadMenu menu = (RadMenu)sender;

            int OrganizatinChartID = int.Parse(menu.DataFieldID);

            enumNavigationMode currentNavigationMode = enumNavigationMode.None;

            if (OrganizatinChartID > 0)
            {
                try
                {
                    switch (e.Item.Value)
                    {
                    case "View":
                        ResetCurrentOrgChart(OrganizatinChartID);
                        currentNavigationMode = enumNavigationMode.View;
                        GoToOrgChartLink("~/OrgChart/OrgChartDetails.aspx", currentNavigationMode);
                        break;

                    case "ViewPublished":
                        ResetCurrentOrgChartLog(OrganizatinChartID);
                        currentNavigationMode = enumNavigationMode.View;
                        GoToOrgChartLink("~/PubOrgChart/OrgChartDetails.aspx", currentNavigationMode);
                        break;

                    case "Edit":
                        ResetCurrentOrgChart(OrganizatinChartID);
                        OrganizationChartManager.Instance.Check(CurrentOrgChartID, CurrentUserID, enumActionType.CheckOut);
                        currentNavigationMode = enumNavigationMode.Edit;
                        GoToOrgChartLink("~/OrgChart/OrgChartDetails.aspx", currentNavigationMode);
                        break;

                    case "ContinueEdit":
                        ResetCurrentOrgChart(OrganizatinChartID);
                        currentNavigationMode = enumNavigationMode.Edit;
                        GoToOrgChartLink("~/OrgChart/OrgChartDetails.aspx", currentNavigationMode);
                        break;

                    case "FinishEdit":
                        ResetCurrentOrgChart(OrganizatinChartID);
                        FinishEditOrgChart(CurrentOrgChartID, CurrentUserID);
                        break;

                    case "Delete":
                        DeleteOrgChart(OrganizatinChartID);
                        break;

                    default:
                        break;
                    }

                    rgSearchResults.Rebind();
                }
                catch (Exception ex)
                {
                    ExceptionBase.HandleException(ex);
                }
            }
        }
示例#10
0
    protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)
    {
        string valor    = e.Item.Value;
        string jCommand = "";

        switch (valor)
        {
        case "tile":
            jCommand = "windowTile();";
            break;

        case "cascade":
            jCommand = "windowCascade();";
            break;

        default:
            jCommand = String.Format("openWindowFromMenu('{0}.aspx?Caller={1}','{0}'); return false;", valor, "MainMenu.aspx");
            break;
        }
        RadAjaxManager1.ResponseScripts.Add(jCommand);
        //string name = e.Item.Value;
        //RadWindow rdw = GetWindowByName(name);
        //if (rdw != null)
        //{
        //    rdw.NavigateUrl = String.Format("{0}.aspx?Caller={1}", e.Item.Value, "MainMenu");
        //    rdw.VisibleOnPageLoad = true;
        //    Session[name] = "open"; // indica que esta ventana está abierta.
        //}
    }
示例#11
0
 protected void RadMenu1_ItemCreated(object sender, RadMenuEventArgs e)
 {
     e.Item.BackColor   = System.Drawing.ColorTranslator.FromHtml("#315B84");
     e.Item.ForeColor   = System.Drawing.Color.White;
     e.Item.Font.Size   = System.Web.UI.WebControls.FontUnit.Medium;
     e.Item.BorderColor = System.Drawing.Color.White;
     e.Item.BorderWidth = 1;
 }
示例#12
0
 protected void rmnMainMenu_ItemClick(object sender, RadMenuEventArgs e)
 {
     if (e.Item.Value == "logout")
     {
         KHCNCT.Admin.modules.Login.LogOut(Request);
         Response.Redirect("~/admin/default.aspx");
     }
 }
示例#13
0
 protected void OnItemClick(object sender, RadMenuEventArgs e)
 {
     if (e.Item.Value == "AKLogout")
     {
         Context.GetOwinContext().Authentication.SignOut();
         Response.Redirect("~/");
     }
 }
示例#14
0
 protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)
 {
     if (e.Item.Text.EndsWith("回到首頁"))
     {
         e.Item.NavigateUrl = "~/Default.aspx";
         e.Item.Target      = "_self";
     }
 }
    protected void PublishMenu_ItemClick(object sender, RadMenuEventArgs e)
    {
        Util util = new Util();
        Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
        if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;

        string tab = e.Item.Value;
        Response.Redirect(tab, false);
    }
示例#16
0
        protected void RadMenu_ItemDataBound(object sender, RadMenuEventArgs e)
        {
            switch (e.Item.Text)
            {
                case "Inicio":
                    {
                        e.Item.ImageUrl = "~/Imagenes/Iconos/home.png";
                    }
                    break;

                case "Administración":
                    {
                        e.Item.ImageUrl = "~/Imagenes/Iconos/key.png";
                    }
                    break;

                case "Tablas Básicas":
                    {
                        e.Item.ImageUrl = "~/Imagenes/Iconos/table.png";
                    }
                    break;

                case "Recolección":
                    {
                        e.Item.ImageUrl = "~/Imagenes/Iconos/recoleccion.png";
                    }
                    break;
                case "Clasificación":
                    {
                        e.Item.ImageUrl = "~/Imagenes/Iconos/clasificacion.png";
                    }
                    break;
                case "Manejo":
                    {
                        e.Item.ImageUrl = "~/Imagenes/Iconos/manejo.png";
                    }
                    break;

                case "Reportes":
                    {
                        e.Item.ImageUrl = "~/Imagenes/Iconos/report.png";
                    }
                    break;

                case "Ayuda":
                    {
                        e.Item.ImageUrl = "~/Imagenes/Iconos/lifebuoy.png";
                    }
                    break;

                case "Salir":
                    {
                        e.Item.ImageUrl = "~/Imagenes/Iconos/cross-button.png";
                    }
                    break;
            }
        }
示例#17
0
 protected void menu_ItemClick(object sender, RadMenuEventArgs e)
 {
     switch (e.Item.Value)
     {
     case "imprimir":
         ImprimirLote();
         break;
     }
 }
    protected void gridMenu_ItemClick(object sender, RadMenuEventArgs e)
    {
        Telerik.Web.UI.RadMenuItem ItemClicked = e.Item;
        string clickedItem = Convert.ToString(ItemClicked.Text);

        if (clickedItem == "New Member")
        {
            Response.Redirect("~/qDbs/wizard.aspx?wizardID=1&stepNumber=1&groupID=2&formID=1&recordID=0");
        }
    }
示例#19
0
 protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)
 {
     switch (e.Item.Value)
     {
     case "dangxuat":
         Session["userId"] = null;
         Response.Redirect(Request.RawUrl);
         break;
     }
 }
 protected void rcm_user_Click(object sender, RadMenuEventArgs e)
 {
     if (e.Item.Value == "In")
     {
         Response.Redirect("~/Login.aspx");
     }
     else if (e.Item.Value == "Out")
     {
         Util.WriteLogWithDetails(HttpContext.Current.User.Identity.Name + " logged out.", "logouts_log");
         FormsAuthentication.SignOut();
         Response.Redirect("~/Default.aspx");
     }
 }
    protected void TabMenu_ItemClick(object sender, RadMenuEventArgs e)
    {
        Util util = new Util();
        Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
        if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;

        string tab = e.Item.Value;

        if (tab == "TabDesignHybrid.aspx" || tab == "TabDesignWeb.aspx")
            State["SelectedApp"] = null;

        Response.Redirect(tab, false);
    }
示例#22
0
 private void _Menu_ItemClick(object sender, RadMenuEventArgs e)
 {
     try
     {
         if (MainMenuItemSelected != null)
         {
             MainMenuItemSelected(sender, e);
         }
     }
     catch (Exception ex)
     {
         HandleError(ex);
     }
 }
    //protected void LoadAdminGrid()
    //{

    //    SqlCommand cmd = new SqlCommand("[SP_FetchAdmin]", con);
    //    cmd.CommandType = CommandType.StoredProcedure;
    //    cmd.Parameters.Add("@IMODE", SqlDbType.Int).Value = 1;
    //    DataSet dsGrid = new DataSet();
    //    AdmingrdView.DataBind();

    //    SqlDataAdapter da = new SqlDataAdapter(cmd);

    //    da.Fill(dsGrid);
    //    if (dsGrid != null && dsGrid.Tables.Count > 0 && dsGrid.Tables[0].Rows.Count > 0)
    //    {

    //        AdmingrdView.DataSource = dsGrid.Tables[0];
    //        AdmingrdView.DataBind();

    //        AdmingrdView.AllowPaging = true;

    //    }
    //    else
    //    {
    //        AdmingrdView.DataSource = new String[] { };
    //        AdmingrdView.DataBind();
    //    }



    //}
    //protected void AdmingrdView_PageIndexChanged(object sender, GridPageChangedEventArgs e)
    //{
    //    LoadAdminGrid();
    //}
    //protected void AdmingrdView_ItemCommand(object sender, GridCommandEventArgs e)
    //{
    //    LoadAdminGrid();
    //}
    //protected void AdmingrdView_PageSizeChanged(object sender, GridPageSizeChangedEventArgs e)
    //{
    //    LoadAdminGrid();
    //}
    //protected void AdmingrdView_SortCommand(object sender, GridSortCommandEventArgs e)
    //{
    //    LoadAdminGrid();
    //}
    //protected void Lnkbtnedit_Click(object sender, EventArgs e)
    //{
    //    string AdminRSN;
    //    LinkButton LnkEditAdditionalsBtn = (LinkButton)sender;
    //    GridDataItem row = (GridDataItem)LnkEditAdditionalsBtn.NamingContainer;
    //    Session["ADRSN"] = row.Cells[2].Text;
    //    AdminRSN = Session["ADRSN"].ToString();
    //    Response.Redirect("AdminEdit.aspx");
    //}
    protected void RMSettings_ItemClick(object sender, RadMenuEventArgs e)
    {
        if (e.Item.Text == "Admin")
        {
            Response.Redirect("Admin.aspx");
        }
        if (e.Item.Text == "Profile ++ LookUp")
        {
            Response.Redirect("AttribLkUpAdd.aspx");
        }
        if (e.Item.Text == "Item Master")
        {
            Response.Redirect("ItemMaster.aspx");
        }
        if (e.Item.Text == "Billing Periods")
        {
        }
        if (e.Item.Text == "Help")
        {
        }
        if (e.Item.Text == "User Management")
        {
            Response.Redirect("~/UserManagement.aspx");
        }
        if (e.Item.Text == "Villa Master")
        {
            Response.Redirect("~/VillaMaster.aspx");
        }
        if (e.Item.Text == "Task List Lookup")
        {
            Response.Redirect("~/TaskLkup.aspx");
        }
        if (e.Item.Text == "Assets")
        {
            Response.Redirect("~/Assets.aspx");
        }
        if (e.Item.Text == "Department Lookup")
        {
            Response.Redirect("~/DeptLkup.aspx");
        }
        if (e.Item.Text == "Service Categories")
        {
            Response.Redirect("~/ServiceConfigLkup.aspx");
        }
        if (e.Item.Text == "Service Types")
        {
            Response.Redirect("~/ServiceConfig.aspx");
        }
    }
示例#24
0
    /// <summary>
    /// A handler for the <strong>RadMenu</strong> ItemDataBound event. Performs hiding
    /// of URLs for group pages, if the <strong>HideUrlForGroupPages</strong> property is
    /// <strong>true</strong>.
    /// </summary>
    /// <remarks>
    /// The event handler is used to enable the feature of hiding the url for a group
    /// page MenuItem. The type of the page corresponding to the current node is checked and if
    /// it is a group page, the url for the CmsSiteMapNode is set to an empty string.
    /// </remarks>
    /// <param name="sender">The object that caused the event.</param>
    /// <param name="e">
    /// An instance of the RadMenuEventArgs class containing information about the
    /// event.
    /// </param>
    public void RadMenu1_ItemDataBound(object sender, RadMenuEventArgs e)
    {
        if (this.hideUrlForGroupPages)
        {
            CmsSiteMapNode node = e.Item.DataItem as CmsSiteMapNode;
            if (node != null)
            {
                // save the PageID in the attributes of the menu item
                e.Item.Attributes.Add("PageID", node.Key);

                if (node.PageType == CmsPageType.Group)
                {
                    e.Item.NavigateUrl = "";
                }
            }
        }
    }
示例#25
0
    protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)
    {
        switch (e.Item.Value)
        {
        case "salir":
            Response.Redirect("Default.aspx");
            break;

        case "revisar":
            SplData.ContentUrl = String.Format("DocumentoGrid.aspx?REVISION=S");
            break;

        case "usuario":
            SplData.ContentUrl = String.Format("UsuarioExtranetForm.aspx?UsuarioExtranetId={0}", uex.UsuarioExtranetId);
            break;
        }
    }
示例#26
0
        protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)
        {
            try
            {
                RadMenuItem item = e.Item;
                if (!string.IsNullOrWhiteSpace(item.Value) && item.Value != "devicetype")
                {
                    string pagename    = string.Empty;
                    string querystring = string.Empty;

                    var parent = item.Parent;

                    if (parent is RadMenuItem)
                    {
                        pagename = ((RadMenuItem)parent).Value.ToLower();
                        if (pagename == "devicetype")
                        {
                            parent   = parent.Parent;
                            pagename = ((RadMenuItem)parent).Value.ToLower();
                        }
                        if (pagename == "devices")
                        {
                            querystring = "?devicetype=" + item.Value;
                        }
                    }
                    else if (item.Value == "sensors")
                    {
                        pagename    = "devices";
                        querystring = "?devicetype=" + item.Value;
                    }
                    else
                    {
                        pagename = item.Value;
                    }


                    string URL = "~/" + pagename + ".aspx" + querystring;
                    Response.Redirect(URL);
                }
            }
            catch (Exception ex)
            {
                throw; //EventLog.WriteEntry("WinkAtHome.Menu.RadMenu1_ItemClick", ex.Message, EventLogEntryType.Error);
            }
        }
示例#27
0
        protected void rmDocument_ItemClick(object sender, RadMenuEventArgs e)
        {
            RadMenu menuDocument = sender as RadMenu;
            string  strUrl       = string.Empty;

            switch (e.Item.Value)
            {
            //need to work on this
            case "1":     //(PDF) --InProcess
                if (!string.IsNullOrEmpty(menuDocument.Attributes["OrganizationChartID"]))
                {
                    int OrgChartID = int.Parse(menuDocument.Attributes["OrganizationChartID"]);
                    ResetCurrentOrgChart(OrgChartID);
//strUrl = string.Format("<iframe src='../OrgChart/DisplayChart.aspx?id={0}' frameborder='0' width='0' height='0' style='display: block;'></iframe>", OrgChartID);
                    strUrl = string.Format("../OrgChart/DisplayChart.aspx?id={0}", OrgChartID);
                    ScriptManager.RegisterStartupScript(Page, Page.GetType(), "popup", "window.open('" + strUrl + "','_blank')", true);
                    //GoToOrgChartLink("~/OrgChart/ViewChart.aspx",enumNavigationMode.View);
                }
                break;

            case "2":    //(PDF) --Published
                if (!string.IsNullOrEmpty(menuDocument.Attributes["OrganizationChartLogID"]))
                {
                    int OrgChartLogID = int.Parse(menuDocument.Attributes["OrganizationChartLogID"]);
                    ResetCurrentOrgChartLog(OrgChartLogID);
                    strUrl = string.Format("../PubOrgChart/DisplayChart.aspx?id={0}", OrgChartLogID);
                    ScriptManager.RegisterStartupScript(Page, Page.GetType(), "popup", "window.open('" + strUrl + "','_blank')", true);
                    //GoToOrgChartLink("~/PubOrgChart/DisplayChart.aspx?id=<Organization Chart Log ID>", enumNavigationMode.View);
                }
                break;

            case "3":    //Export To Excel
                if (!string.IsNullOrEmpty(menuDocument.Attributes["OrgChartID"]))
                {
                    int OrgChartID = int.Parse(menuDocument.Attributes["OrgChartID"]);
                    base.ExportToExcel(OrgChartID);
                }
                break;

            default:
                break;
            }

            e.Item.Selected = false;
        }
        protected void radMenu_ItemClick(object sender, RadMenuEventArgs e)
        {
            int radGridClickedRowIndex;

            radGridClickedRowIndex = Convert.ToInt32(Request.Form["radGridClickedRowIndex"]);
            switch (e.Item.Text)
            {
            case "Delete":
                gvCustomerAlertSetup.Items[radGridClickedRowIndex].Edit = true;
                gvCustomerAlertSetup.Rebind();
                break;

            case "Add":
                gvCustomerAlertSetup.MasterTableView.IsItemInserted = true;
                gvCustomerAlertSetup.Rebind();
                break;
            }
        }
示例#29
0
    protected void RMKPlanner_ItemClick(object sender, RadMenuEventArgs e)
    {
        if (e.Item.Text == "Food Items")
        {
            Response.Redirect("RawMaterial.aspx");
        }
        if (e.Item.Text == "Food Ingredients")
        {
            Response.Redirect("RMMenu.aspx");
        }
        if (e.Item.Text == "Sessions")
        {
            Response.Redirect("SessionMaster.aspx");
        }
        if (e.Item.Text == "Which Item When?")
        {
            Response.Redirect("FoodMenu.aspx?MenuName=Which Menu When?");
        }
        else if (e.Item.Text == "How many diners?")
        {
            Response.Redirect("FoodMenu.aspx?MenuName=How many diners?");
        }
        else if (e.Item.Text == "Menu for the day")
        {
            Response.Redirect("FoodMenu.aspx?MenuName=Menu For Day");
        }
        else if (e.Item.Text == "Menu Items")
        {
            Response.Redirect("FoodMenu.aspx?MenuName=Menu Items");
        }

        else if (e.Item.Text == "Help")
        {
            Response.Redirect("FoodMenu.aspx");
        }
        else if (e.Item.Text == "Diners Update")
        {
            Response.Redirect("FoodMenu.aspx?MenuName=Diners Update");
        }
        else if (e.Item.Text == "Dining Transactions")
        {
            Response.Redirect("FoodMenu.aspx?MenuName=Dining Transactions");
        }
    }
示例#30
0
        protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)
        {
            try
            {
                RadMenuItem item = e.Item;
                if (!string.IsNullOrWhiteSpace(item.Value) && item.Value != "devicetype")
                {
                    string pagename = string.Empty;
                    string querystring = string.Empty;

                    var parent = item.Parent;

                    if (parent is RadMenuItem)
                    {
                        pagename = ((RadMenuItem)parent).Value.ToLower();
                        if (pagename == "devicetype")
                        {
                            parent = parent.Parent;
                            pagename = ((RadMenuItem)parent).Value.ToLower();
                        }
                        if (pagename == "devices")
                        {
                            querystring = "?devicetype=" + item.Value;
                        }
                    }
                    else if (item.Value == "sensors")
                    {
                        pagename = "devices";
                        querystring = "?devicetype=" + item.Value;
                    }
                    else
                    {
                        pagename = item.Value;
                    }

                    string URL = "~/" + pagename + ".aspx" + querystring;
                    Response.Redirect(URL);
                }
            }
            catch (Exception ex)
            {
                throw; //EventLog.WriteEntry("WinkAtHome.Menu.RadMenu1_ItemClick", ex.Message, EventLogEntryType.Error);
            }
        }
示例#31
0
    protected void EmailContextMenuClick(object sender, RadMenuEventArgs e)
    {
        String UserID     = Util.GetUserId();
        String ActionCode = e.Item.Value;

        Contact c       = new Contact(ContactID);
        bool    Refresh = true;

        switch (ActionCode)
        {
        case "v": c.ToggleEmailVerified(UserID); break;                      // verify

        case "r": c.RemoveEmailAddress(UserID); break;                       // remove

        case "ree": c.RemoveEmailEstimated(); break;                         // remove email estimated flag

        case "est_dg": EstimateEmailWithDataGeek(c); Refresh = false; break; // estimate with dg

        case "est_eh": EstimateEmailEmailHunter(c); Refresh = false; break;  // estimate with email hunter

        case "oo": c.ToggleEmailOptedOut(); break;                           // toggle opted out

        case "oi": c.ToggleEmailOptedIn(); break;                            // toggle opted in

        case "ro": c.RemoveOptedStatus(); break;                             // remove opted

        case "b": c.MarkEmailAsBounced(); break;                             // mark as bounced

        case "sub": Refresh = false; break;                                  // mag subs parent node, cancel

        default:
            e.Item.Enabled  = false;
            e.Item.ImageUrl = "~/images/leads/ico_verified.png";
            MailChimpAPI.AddSubscriberToList(ActionCode, c.WorkEmail, c.FirstName, c.LastName); Util.PageMessageAlertify(this, "Subscription Added", "Subscribed"); Refresh = false; break;     // magazine subscriptions
        }

        if (Refresh)
        {
            RefreshParent();
        }
    }
    protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)
    {
        switch (e.Item.Value)
        {
        case "SYS_DEF":
            Response.Redirect("~/Isome/BulkReportImport.aspx?IMPORT_ID=38&RetUrl=~/TestPackage/TestPkg.aspx");
            break;

        case "TEST_IMP":
            Response.Redirect("~/Isome/BulkReportImport.aspx?IMPORT_ID=39&RetUrl=~/TestPackage/TestPkg.aspx");
            break;

        case "TPK_ISOME":
            Response.Redirect("~/Isome/BulkReportImport.aspx?IMPORT_ID=40&RetUrl=~/TestPackage/TestPkg.aspx");
            break;

        case "TPK_SPL":
            Response.Redirect("~/Isome/BulkReportImport.aspx?IMPORT_ID=41&RetUrl=~/TestPackage/TestPkg.aspx");
            break;
        }
    }
示例#33
0
        protected void menu_ItemClick(object sender, RadMenuEventArgs e)
        {
            switch (e.Item.Value)
            {
            case "novo":
                Response.Redirect("RMECad.aspx");
                break;

            case "listar":
                Response.Redirect("RMELis.aspx");
                break;

            case "salvar":
                if (string.IsNullOrEmpty(Request["registroManutencaoID"]))
                {
                    Inserir();
                }
                else
                {
                    Atualizar(int.Parse(Request["registroManutencaoID"]));
                }

                if (ddlStatus.SelectedItem.Text == "Finalizado")
                {
                    AlterarControlesFinalizacao();
                }
                break;

            case "salvar_como":
                break;

            case "excluir":
                Excluir(int.Parse(Request["registroManutencaoID"]));
                break;

            case "imprimir":
                break;
            }
        }
    protected void CopyThisCompanyDown(object sender, RadMenuEventArgs e)
    {
        UpdateTempLeads();

        Control c_sender          = new Control();
        bool    from_context_menu = false;

        if (sender is RadContextMenu)
        {
            c_sender          = (RadContextMenu)sender;
            from_context_menu = true;
        }
        else if (sender is ImageButton)
        {
            c_sender = (ImageButton)sender;
        }

        GridDataItem item         = (GridDataItem)c_sender.Parent.Parent.Parent;
        String       temp_lead_id = item["TempLeadID"].Text;

        int num_to_copy = 1;

        if (from_context_menu)
        {
            Int32.TryParse(e.Item.Value, out num_to_copy);
        }

        for (int i = 0; i < num_to_copy; i++)
        {
            String iqry = "INSERT INTO dbl_temp_leads (UserID, CompanyName, Country, CompanyPhone, Website) " +
                          "SELECT UserID, CompanyName, Country, CompanyPhone, Website FROM dbl_temp_leads WHERE TempLeadID=@TempLeadID";
            SQL.Insert(iqry,
                       new String[] { "@TempLeadID" },
                       new Object[] { temp_lead_id });
        }

        BindTempLeads();
    }
        /// <summary>
        /// event to make context menu actions
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gridContextMenu_ItemClick(object sender, RadMenuEventArgs e)
        {
            try
            {
                IndGrid dataGrid = this.DataGrid;

                //find what context menu item was click
                switch (e.Item.Value)
                {
                case EXPAND_MASTER:
                    ExpandMaster(dataGrid);
                    break;

                case COLLAPSE_MASTER:
                    CollapseMaster(dataGrid);
                    break;

                case EXPAND_DETAIL:
                    ExpandDetail(dataGrid);
                    break;

                case COLLAPSE_DETAIL:
                    CollapseDetail(dataGrid);
                    break;
                }
                dataGrid.Rebind();
            }
            catch (IndException ex)
            {
                ControlHierarchyManager.ReportError(ex);
                return;
            }
            catch (Exception ex)
            {
                ControlHierarchyManager.ReportError(new IndException(ex));
                return;
            }
        }
        // ////////////////////////////////////////////////////////////////////////
        // NAVIGATION EVENTS
        //
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            // Store active tab for postback
            Session["activeTabMaterials"] = "0";
            Session["dialogOpenedMaterials"] = "0";

            string activeTabMaterials = hdfActiveTab.Value;
            string url = "";

            switch (e.Item.Value)
            {
                case "mSave":
                    this.Save();
                    break;

                case "mApply":
                    this.Apply();
                    break;

                case "mCancel":
                    if (Request.QueryString["source_page"] == "materials_navigator2.aspx")
                    {
                        url = "./materials_navigator2.aspx?source_page=materials_edit.aspx" + GetNavigatorState() + "&update=yes";
                    }
                    else
                    {
                        if (Request.QueryString["source_page"] == "materials_summary.aspx")
                        {
                            url = "./materials_summary.aspx?source_page=materials_edit.aspx&material_id=" + hdfCurrentMaterialId.Value + GetNavigatorState() + "&update=yes" + "&active_tab=" + activeTabMaterials;
                        }
                    }
                    break;

                case "mPrevious":
                    // Get previous record
                    int previousId = MaterialsNavigator.GetPreviousId((MaterialsNavigatorTDS)Session["materialsNavigatorTDS"], Int32.Parse(hdfCurrentMaterialId.Value));
                    if (previousId != Int32.Parse(hdfCurrentMaterialId.Value))
                    {
                        this.Apply();

                        // Redirect
                        url = "./materials_edit.aspx?source_page=" + Request.QueryString["source_page"] + "&material_id=" + previousId.ToString() + "&active_tab=" + activeTabMaterials + GetNavigatorState() + "&update=yes";
                    }
                    break;

                case "mNext":
                    // Get next record
                    int nextId = MaterialsNavigator.GetNextId((MaterialsNavigatorTDS)Session["materialsNavigatorTDS"], Int32.Parse(hdfCurrentMaterialId.Value));
                    if (nextId != Int32.Parse(hdfCurrentMaterialId.Value))
                    {
                        this.Apply();

                        // Redirect
                        url = "./materials_edit.aspx?source_page=" + Request.QueryString["source_page"] + "&material_id=" + nextId.ToString() + "&active_tab=" + activeTabMaterials + GetNavigatorState() + "&update=yes";
                    }
                    break;
            }

            if (url != "") Response.Redirect(url);
        }
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            if (e.Item.Value == "mPreview")
            {
                if (prLiningPlanTDS.PlLiningPlan.Rows.Count > 0)
                {
                    Page.Validate();
                    if (Page.IsValid)
                    {
                        PostPageChanges();

                        string name = "";
                        string client = "";
                        string project = "";

                        // ... for client
                        int companyId = Int32.Parse(hdfCompanyId.Value);
                        int currentClientId = Int32.Parse(hdfCurrentClientId.Value.ToString());
                        CompaniesGateway companiesGateway = new CompaniesGateway();
                        companiesGateway.LoadByCompaniesId(currentClientId, companyId);
                        client += "Client: " + companiesGateway.GetName(currentClientId);

                        // ... for project
                        int currentProjectId = Int32.Parse(hdfCurrentProjectId.Value.ToString());
                        ProjectGateway projectGateway = new ProjectGateway();
                        projectGateway.LoadByProjectId(currentProjectId);
                        project = projectGateway.GetName(currentProjectId);
                        name = client + " > Project: " + project + " (" + projectGateway.GetProjectNumber(currentProjectId) + ")";

                        Response.Write("<script language='javascript'> {window.open('./pr_lining_plan_report.aspx?name=" + name + "', '_blank', 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=800, height=680');}</script>");
                    }
                }
            }
        }
        // ////////////////////////////////////////////////////////////////////////
        // NAVIGATION EVENTS
        //
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            string url = "";
            switch (e.Item.Value)
            {
                case "mSave":
                    hdfAction.Value = "Save";
                    Save();
                    break;

                case "mApply":
                    hdfAction.Value = "Apply";
                    Apply();
                    break;

                case "mCancel":
                      toDoListInformationTDS.RejectChanges();

                      if (Request.QueryString["source_page"] == "toDoList_summary.aspx")
                      {
                          url = "./toDoList_summary.aspx?source_page=toDoList_activity.aspx&dashboard=" + hdfDashboard.Value + "&toDo_id=" + hdfToDoId.Value + GetNavigatorState() + "&update=yes";
                      }

                      break;
            }

            if (url != "") Response.Redirect(url);
        }
    protected void resultsMenu_ItemClick(object sender, RadMenuEventArgs e)
    {
        Telerik.Web.UI.RadMenuItem ItemClicked = e.Item;
        string clickedItem = Convert.ToString(ItemClicked.Text);

        if (clickedItem == "Word")
        {
            RadGrid1.ExportSettings.IgnorePaging = true;
            RadGrid1.ExportSettings.OpenInNewWindow = true;
            RadGrid1.MasterTableView.ExportToWord();
        }
        else if (clickedItem == "CSV")
        {
            RadGrid1.ExportSettings.IgnorePaging = true;
            RadGrid1.ExportSettings.OpenInNewWindow = true;
            RadGrid1.MasterTableView.ExportToCSV();
        }
        else if (clickedItem == "Download To Excel")
        {
            RadGrid1.ExportSettings.ExportOnlyData = true;
            RadGrid1.ExportSettings.IgnorePaging = true;
            RadGrid1.ExportSettings.OpenInNewWindow = true;
            RadGrid1.ExportSettings.FileName = "User Assessments-ID=" + Session["TrainingID"] +"_run=" + DateTime.Now;
            RadGrid1.MasterTableView.ExportToExcel();
        }
        else if (clickedItem == "PDF")
        {
            RadGrid1.ExportSettings.IgnorePaging = true;
            RadGrid1.ExportSettings.OpenInNewWindow = true;
            RadGrid1.MasterTableView.ExportToPdf();
        }
        else if (clickedItem == "Reset")
        {
            Response.Redirect(Request.Url.ToString());
        }
    }
        // ////////////////////////////////////////////////////////////////////////
        // NAVIGATION EVENTS
        //
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            string category = hdfCategory.Value;
            string url = "";

            switch (e.Item.Value)
            {
                case "mSave":
                    this.Save();
                    break;

                case "mApply":
                    this.Apply();
                    break;

                case "mCancel":
                    if (Request.QueryString["source_page"] == "actual_costs_navigator2.aspx")
                    {
                        url = "./actual_costs_navigator2.aspx?source_page=actual_costs_edit.aspx" + GetNavigatorState() + "&update=yes";
                    }
                    else
                    {
                        if (Request.QueryString["source_page"] == "actual_costs_summary.aspx")
                        {
                            url = "./actual_costs_summary.aspx?source_page=actual_costs_edit.aspx&project_id=" + hdfProjectId.Value + GetNavigatorState() + "&update=yes" + "&ref_id=" + hdfRefId.Value + "&category=" + category;
                        }
                    }
                    break;

                case "mPrevious":
                    // Get previous record
                    // Get previous record
                    int previousId = 0;

                    if (category == "Subcontractors")
                    {
                        previousId = ActualCostsNavigatorSubcontractorCosts.GetPreviousId((ActualCostsNavigatorTDS)Session["actualCostsNavigatorTDS"], Int32.Parse(hdfRefId.Value));
                    }
                    else
                    {
                        if (category == "Hotels")
                        {
                            previousId = ActualCostsNavigatorHotelCosts.GetPreviousId((ActualCostsNavigatorTDS)Session["actualCostsNavigatorTDS"], Int32.Parse(hdfRefId.Value));
                        }
                        else
                        {
                            if (category == "Insurance")
                            {
                                previousId = ActualCostsNavigatorInsuranceCompaniesCosts.GetPreviousId((ActualCostsNavigatorTDS)Session["actualCostsNavigatorTDS"], Int32.Parse(hdfRefId.Value));
                            }
                            else
                            {
                                if (category == "Bonding")
                                {
                                    previousId = ActualCostsNavigatorBondingCompaniesCosts.GetPreviousId((ActualCostsNavigatorTDS)Session["actualCostsNavigatorTDS"], Int32.Parse(hdfRefId.Value));
                                }
                                else
                                {
                                    // other categories
                                    previousId = ActualCostsNavigatorOtherCosts.GetPreviousId((ActualCostsNavigatorTDS)Session["actualCostsNavigatorTDS"], Int32.Parse(hdfRefId.Value));
                                }
                            }
                        }
                    }

                    // Navigate previous
                    if (previousId != Int32.Parse(hdfRefId.Value))
                    {
                        // Redirect
                        url = "./actual_costs_edit.aspx?source_page=actual_costs_navigator2.aspx&ref_id=" + previousId.ToString() + "&project_id=" + hdfProjectId.Value + "&category=" + hdfCategory.Value + GetNavigatorState();
                    }
                    break;

                case "mNext":
                    // Get next record
                    int nextId = 0;

                    if (category == "Subcontractors")
                    {
                        nextId = ActualCostsNavigatorSubcontractorCosts.GetNextId((ActualCostsNavigatorTDS)Session["actualCostsNavigatorTDS"], Int32.Parse(hdfRefId.Value));
                    }
                    else
                    {
                        if (category == "Hotels")
                        {
                            nextId = ActualCostsNavigatorHotelCosts.GetNextId((ActualCostsNavigatorTDS)Session["actualCostsNavigatorTDS"], Int32.Parse(hdfRefId.Value));
                        }
                        else
                        {
                            if (category == "Insurance")
                            {
                                nextId = ActualCostsNavigatorInsuranceCompaniesCosts.GetNextId((ActualCostsNavigatorTDS)Session["actualCostsNavigatorTDS"], Int32.Parse(hdfRefId.Value));
                            }
                            else
                            {
                                if (category == "Bonding")
                                {
                                    nextId = ActualCostsNavigatorBondingCompaniesCosts.GetNextId((ActualCostsNavigatorTDS)Session["actualCostsNavigatorTDS"], Int32.Parse(hdfRefId.Value));
                                }
                                else
                                {
                                    // other categories
                                    nextId = ActualCostsNavigatorOtherCosts.GetNextId((ActualCostsNavigatorTDS)Session["actualCostsNavigatorTDS"], Int32.Parse(hdfRefId.Value));
                                }
                            }
                        }
                    }

                    if (nextId != Int32.Parse(hdfRefId.Value))
                    {
                        // Redirect
                        url = "./actual_costs_edit.aspx?source_page=actual_costs_navigator2.aspx&ref_id=" + nextId.ToString() + "&project_id=" + hdfProjectId.Value + "&category=" + hdfCategory.Value + GetNavigatorState();
                    }
                    break;
            }

            if (url != "") Response.Redirect(url);
        }
        // ////////////////////////////////////////////////////////////////////////
        // NAVIGATION EVENTS
        //
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            string url = "";

            switch (e.Item.Value)
            {
                case "mSave":
                    this.Save();
                    break;
            }

            if (url != "") Response.Redirect(url);
        }
    protected void TabMenu_ItemClick(object sender, RadMenuEventArgs e)
    {
        Util util = new Util();
        Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
        if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;

        //if (SavedCanvasHtml.Text.Length > 0)
        //     SavePage();

        string tab = e.Item.Value;

        if (tab == "DesignHybrid" || tab == "DesignWeb")
            State["SelectedApp"] = null;

        Response.Redirect("../Tab" + tab + ".aspx", false);
    }
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            // Store active tab for postback
            Session["activeTabPr"] = "0";
            Session["dialogOpenedPr"] = "0";

            string activeTab = hdfActiveTab.Value;
            string url = "";

            switch (e.Item.Value)
            {
                case "mEdit":
                    switch (ddlFilter.SelectedValue)
                    {
                        case "(All)":
                            SetFilter("Deleted = 0");
                            break;

                        case "Robotic Reaming":
                            SetFilter("Type='Robotic Reaming' AND Deleted = 0");
                            break;

                        case "Point Lining":
                            SetFilter("Type='Point Lining' AND Deleted = 0");
                            break;

                        case "Grouting":
                            SetFilter("Type='Grouting' AND Deleted = 0");
                            break;
                    }
                    url = "./pr_edit.aspx?source_page=pr_summary.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + GetNavigatorState() + "&asset_id=" + hdfAssetId.Value + "&update=" + (string)ViewState["update"] + "&active_tab=" + hdfActiveTab.Value;
                    break;

                case "mDelete":
                    switch (ddlFilter.SelectedValue)
                    {
                        case "(All)":
                            SetFilter("Deleted = 0");
                            break;

                        case "Robotic Reaming":
                            SetFilter("Type='Robotic Reaming' AND Deleted = 0");
                            break;

                        case "Point Lining":
                            SetFilter("Type='Point Lining' AND Deleted = 0");
                            break;

                        case "Grouting":
                            SetFilter("Type='Grouting' AND Deleted = 0");
                            break;
                    }
                    url = "./pr_delete.aspx?source_page=pr_summary.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + GetNavigatorState() + "&asset_id=" + hdfAssetId.Value + "&update=" + (string)ViewState["update"];
                    break;

                // Go to Works
                case "mRehabAssessment":
                    url = "./../../CWP/RehabAssessment/ra_navigator.aspx?source_page=select_project.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + "&work_type=Rehab Assessment";
                    break;

                case "mFullLenghtLining":
                    url = "./../../CWP/FullLengthLining/fl_navigator.aspx?source_page=select_project.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + "&work_type=Full Length Lining";
                    break;

                case "mJunctionLining":
                    url = "./../../CWP/JunctionLining/jl_navigator.aspx?source_page=select_project.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + "&work_type=Junction Lining";
                    break;

                // Navigate
                case "mLastSearch":
                    url = "./pr_navigator2.aspx?source_page=pr_summary.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"];
                    break;

                case "mPrevious":
                    // Get previous record
                    int previousId = PrNavigator.GetPreviousId((PrNavigatorTDS)Session["prNavigatorTDS"], Int32.Parse(hdfAssetId.Value));
                    if (previousId != Int32.Parse(hdfAssetId.Value))
                    {
                        switch (ddlFilter.SelectedValue)
                        {
                            case "(All)":
                                SetFilter("Deleted = 0");
                                break;

                            case "Robotic Reaming":
                                SetFilter("Type='Robotic Reaming' AND Deleted = 0");
                                break;

                            case "Point Lining":
                                SetFilter("Type='Point Lining' AND Deleted = 0");
                                break;

                            case "Grouting":
                                SetFilter("Type='Grouting' AND Deleted = 0");
                                break;
                        }

                        // Redirect
                        url = "./pr_summary.aspx?source_page=pr_navigator2.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + "&asset_id=" + previousId.ToString() + "&active_tab=" + activeTab + GetNavigatorState();
                    }
                    break;

                case "mNext":
                    // Get next record
                    int nextId = PrNavigator.GetNextId((PrNavigatorTDS)Session["prNavigatorTDS"], Int32.Parse(hdfAssetId.Value));
                    if (nextId != Int32.Parse(hdfAssetId.Value))
                    {
                        switch (ddlFilter.SelectedValue)
                        {
                            case "(All)":
                                SetFilter("Deleted = 0");
                                break;

                            case "Robotic Reaming":
                                SetFilter("Type='Robotic Reaming' AND Deleted = 0");
                                break;

                            case "Point Lining":
                                SetFilter("Type='Point Lining' AND Deleted = 0");
                                break;

                            case "Grouting":
                                SetFilter("Type='Grouting' AND Deleted = 0");
                                break;
                        }

                        // Redirect
                        url = "./pr_summary.aspx?source_page=pr_navigator2.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + "&asset_id=" + nextId.ToString() + "&active_tab=" + activeTab + GetNavigatorState();
                    }
                    break;
            }

            if (url != "") Response.Redirect(url);
        }
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            // Store active tab for postback
            Session["activeTabFll"] = "0";
            Session["dialogOpenedFll"] = "0";

            string activeTab = hdfActiveTab.Value;
            string url = "";

            switch (e.Item.Value)
            {
                case "mEdit":
                    url = "./fl_edit.aspx?source_page=fl_summary.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + GetNavigatorState() + "&asset_id=" + hdfAssetId.Value + "&update=" + (string)ViewState["update"] + "&active_tab=" + activeTab;
                    break;

                case "mDelete":
                    url = "./fl_delete.aspx?source_page=fl_summary.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + GetNavigatorState() + "&asset_id=" + hdfAssetId.Value + "&update=" + (string)ViewState["update"];
                    break;

                case "mLastSearch":
                    url = "./fl_navigator2.aspx?source_page=fl_summary.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"];
                    break;

                case "mPrevious":
                    // Get previous record
                    int previousId = FlNavigator.GetPreviousId((FlNavigatorTDS)Session["flNavigatorTDS"], Int32.Parse(hdfAssetId.Value));
                    if (previousId != Int32.Parse(hdfAssetId.Value))
                    {
                        url = "./fl_summary.aspx?source_page=fl_navigator2.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + "&asset_id=" + previousId.ToString() + "&active_tab=" + activeTab + GetNavigatorState();
                    }
                    break;

                case "mNext":
                    // Get next record
                    int nextId = FlNavigator.GetNextId((FlNavigatorTDS)Session["flNavigatorTDS"], Int32.Parse(hdfAssetId.Value));
                    if (nextId != Int32.Parse(hdfAssetId.Value))
                    {
                        url = "./fl_summary.aspx?source_page=fl_navigator2.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + "&asset_id=" + nextId.ToString() + "&active_tab=" + activeTab + GetNavigatorState();
                    }
                    break;

                // Works
                case "mRehabAssessment":
                    url = "./../../CWP/RehabAssessment/ra_navigator.aspx?source_page=select_project.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + "&work_type=Rehab Assessment";
                    break;

                case "mPointRepairs":
                    url = "./../PointRepairs/pr_navigator.aspx?source_page=select_project.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + "&work_type=Point Repairs";
                    break;

                case "mJunctionLining":
                    url = "./../JunctionLining/jl_navigator.aspx?source_page=select_project.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + "&work_type=Junction Lining";
                    break;
            }

            if (url != "") Response.Redirect(url);
        }
        // ////////////////////////////////////////////////////////////////////////
        // NAVIGATION EVENTS
        //
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            // Store active tab for postback
            Session["activeTabUnits"] = "0";
            Session["dialogOpenedUnits"] = "0";

            string activeTab = hdfActiveTab.Value;
            string url = "";

            switch (e.Item.Value)
            {
                case "mSave":
                    this.Save();
                    break;

                case "mApply":
                    this.Apply();
                    break;

                case "mCancel":
                    Session.Remove("libraryTDSForUnits");

                    if (Request.QueryString["source_page"] == "units_navigator2.aspx" || Request.QueryString["source_page"] == "units_add.aspx")
                    {
                        url = "./units_navigator2.aspx?source_page=units_edit.aspx" + GetNavigatorState() + "&update=" + (string)ViewState["update"];
                    }

                    if (Request.QueryString["source_page"] == "units_summary.aspx")
                    {
                        url = "./units_summary.aspx?source_page=units_edit.aspx&unit_id=" + hdfUnitId.Value + "&unit_type=" + hdfUnitType.Value + "&unit_state=" + hdfUnitState.Value + "&active_tab=" + hdfActiveTab.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"];
                    }
                    break;

                case "mPrevious":
                    Session.Remove("libraryTDSForUnits");

                    // Get previous record
                    int previousId = UnitsNavigator.GetPreviousId((UnitsNavigatorTDS)Session["unitsNavigatorTDS"], Int32.Parse(hdfUnitId.Value));

                    if (previousId != Int32.Parse(hdfUnitId.Value))
                    {
                        this.Apply();

                        // ... Redirect
                        int companyId = Int32.Parse(hdfCompanyId.Value);
                        int unitId = Int32.Parse(hdfUnitId.Value);
                        UnitsGateway unitsGateway = new UnitsGateway();
                        unitsGateway.LoadByUnitId(unitId, companyId);
                        string unitType = unitsGateway.GetType(unitId);
                        string unitState = unitsGateway.GetState(unitId);

                        url = "./units_edit.aspx?source_page=" + Request.QueryString["source_page"] + "&unit_id=" + previousId + "&unit_type=" + unitType + "&unit_state=" + unitState + "&active_tab=" + activeTab + GetNavigatorState() + "&update=yes";
                    }
                    break;

                case "mNext":
                    Session.Remove("libraryTDSForUnits");

                    // Get next record
                    int nextId = UnitsNavigator.GetNextId((UnitsNavigatorTDS)Session["unitsNavigatorTDS"], Int32.Parse(hdfUnitId.Value));

                    if (nextId != Int32.Parse(hdfUnitId.Value))
                    {
                        this.Apply();

                        // ... Redirect
                        int companyId = Int32.Parse(hdfCompanyId.Value);
                        int unitId = Int32.Parse(hdfUnitId.Value);
                        UnitsGateway unitsGateway = new UnitsGateway();
                        unitsGateway.LoadByUnitId(unitId, companyId);
                        string unitType = unitsGateway.GetType(unitId);
                        string unitState = unitsGateway.GetState(unitId);

                        url = "./units_edit.aspx?source_page=" + Request.QueryString["source_page"] + "&unit_id=" + nextId + "&unit_type=" + unitType + "&unit_state=" + unitState + "&active_tab=" + activeTab + GetNavigatorState() + "&update=yes";
                    }
                    break;
            }

            if (url != "") Response.Redirect(url);
        }
        // ////////////////////////////////////////////////////////////////////////
        // NAVIGATION EVENTS
        //
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            string url = null;

            switch (e.Item.Value)
            {
                case "mDelete":
                    Page.Validate();

                    if (Page.IsValid)
                    {
                        Delete();
                        UpdateDatabase();

                        // Redirect
                        if (Request.QueryString["source_page"] == "actual_costs_navigator2.aspx")
                        {
                            url = "./actual_costs_navigator2.aspx?source_page=actual_costs_delete.aspx&project_id=" + hdfCurrentProjectId.Value + "&ref_id=" + hdfCurrentRefId.Value + GetNavigatorState() + "&update=yes";
                        }

                        if (Request.QueryString["source_page"] == "actual_costs_summary.aspx")
                        {
                            url = "./actual_costs_summary.aspx?source_page=actual_costs_delete.aspx&project_id=" + hdfCurrentProjectId.Value + "&ref_id=" + hdfCurrentRefId.Value + GetNavigatorState() + "&update=yes" ;
                        }

                        Response.Redirect(url);
                    }
                    break;

                case "mCancel":
                    if (Request.QueryString["source_page"] == "actual_costs_navigator2.aspx")
                    {
                        url = "./actual_costs_navigator2.aspx?source_page=actual_costs_delete.aspx&project_id=" + hdfCurrentProjectId.Value + "&ref_id=" + hdfCurrentRefId.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"];
                    }

                    if (Request.QueryString["source_page"] == "actual_costs_summary.aspx")
                    {
                        url = "./actual_costs_summary.aspx?source_page=actual_costs_delete.aspx&project_id=" + hdfCurrentProjectId.Value + "&ref_id=" + hdfCurrentRefId.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"];
                    }

                    if (url != "") Response.Redirect(url);
                    break;
            }
        }
        // ////////////////////////////////////////////////////////////////////////
        // NAVIGATION EVENTS
        //
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            DropDownList ddlOthersFor = (DropDownList)tkrpbLeftMenuOthersTimesheets.FindItemByValue("nbOthersTimesheetsDDL").FindControl("ddlOthersFor");
            Session["ddlOthersForSelectedValue"] = ddlOthersFor.SelectedValue;

            string url = null;

            switch (e.Item.Value)
            {
                case "mAdd":
                    if (Request.QueryString["source_page"] == "timesheet_approve.aspx")
                    {
                        url = "./timesheet_add.aspx?source_page=timesheet_summary_from_approve_project_times.aspx&others=" + ViewState["others"] + "&employee_id=" + ViewState["employee_id"] + "&period_id=" + ViewState["period_id"] + "&projecttime_id=" + ViewState["projecttime_id"];
                    }
                    else
                    {
                        url = "./timesheet_add.aspx?source_page=timesheet_summary.aspx&others=" + ViewState["others"] + "&employee_id=" + ViewState["employee_id"] + "&period_id=" + ViewState["period_id"] + "&projecttime_id=" + ViewState["projecttime_id"];
                    }
                    break;

                case "mEdit":
                    if (Request.QueryString["source_page"] == "timesheet_approve.aspx")
                    {
                        url = "./timesheet_edit.aspx?source_page=timesheet_summary_from_approve_project_times.aspx&others=" + ViewState["others"] + "&employee_id=" + ViewState["employee_id"] + "&period_id=" + ViewState["period_id"] + "&projecttime_id=" + ViewState["projecttime_id"];
                    }
                    else
                    {
                        url = "./timesheet_edit.aspx?source_page=timesheet_summary.aspx&others=" + ViewState["others"] + "&employee_id=" + ViewState["employee_id"] + "&period_id=" + ViewState["period_id"] + "&projecttime_id=" + ViewState["projecttime_id"];
                    }
                    break;

                case "mDelete":
                    if (Request.QueryString["source_page"] == "timesheet_approve.aspx")
                    {
                        url = "./timesheet_delete.aspx?source_page=timesheet_summary_from_approve_project_times.aspx&others=" + ViewState["others"] + "&employee_id=" + ViewState["employee_id"] + "&period_id=" + ViewState["period_id"] + "&projecttime_id=" + ViewState["projecttime_id"];
                    }
                    else
                    {
                        url = "./timesheet_delete.aspx?source_page=timesheet_summary.aspx&others=" + ViewState["others"] + "&employee_id=" + ViewState["employee_id"] + "&period_id=" + ViewState["period_id"] + "&projecttime_id=" + ViewState["projecttime_id"];
                    }
                    break;

                case "mTimesheet":
                    url = "./../timesheet/timesheet.aspx?source_page=timesheet_summary.aspx&others=" + ViewState["others"] + "&employee_id=" + ViewState["employee_id"] + "&period_id=" + ViewState["period_id"] + "&projecttime_id=" + ViewState["projecttime_id"];
                    break;

                case "mApproveProjectTimes":
                    url = "./timesheet_state.aspx?source_page=timesheet_summary.aspx&others=" + ViewState["others"] + "&employee_id=" + ViewState["employee_id"] + "&period_id=" + ViewState["period_id"] + "&projecttime_id=" + ViewState["projecttime_id"];
                    break;
            }

            Response.Redirect(url);
        }
示例#48
0
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            // Store active tab for postback
            Session["activeTabFll"] = "0";
            Session["dialogOpenedFll"] = "0";

            string activeTab = hdfActiveTab.Value;
            string url = "";

            switch (e.Item.Value)
            {
                case "mSave":
                    this.Save();
                    break;

                case "mApply":
                    this.Apply();
                    break;

                case "mCancel":
                    fullLengthLiningTDS.RejectChanges();
                    Session["fullLengthLiningTDS"] = fullLengthLiningTDS;
                    if (Request.QueryString["source_page"] == "fl_navigator2.aspx")
                    {
                        url = "./fl_navigator2.aspx?source_page=fl_edit.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + GetNavigatorState() + "&update=yes";
                    }

                    if (Request.QueryString["source_page"] == "fl_summary.aspx")
                    {
                        url = "./fl_summary.aspx?source_page=fl_edit.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + GetNavigatorState() + "&update=yes" + "&asset_id=" + hdfAssetId.Value + "&active_tab=" + activeTab;
                    }
                    break;

                case "mPrevious":
                    // Get previous record
                    int previousId = FlNavigator.GetPreviousId((FlNavigatorTDS)Session["flNavigatorTDS"], Int32.Parse(hdfAssetId.Value));
                    if (previousId != Int32.Parse(hdfAssetId.Value))
                    {
                        if (this.Apply())
                        {
                            // Redirect
                            url = "./fl_edit.aspx?source_page=" + Request.QueryString["source_page"] + "&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + "&asset_id=" + previousId.ToString() + "&active_tab=" + activeTab + GetNavigatorState() + "&update=yes";
                        }
                    }
                    break;

                case "mNext":
                    // Get next record
                    int nextId = FlNavigator.GetNextId((FlNavigatorTDS)Session["flNavigatorTDS"], Int32.Parse(hdfAssetId.Value));
                    if (nextId != Int32.Parse(hdfAssetId.Value))
                    {
                        if (this.Apply())
                        {
                            // Redirect
                            url = "./fl_edit.aspx?source_page=" + Request.QueryString["source_page"] + "&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + "&asset_id=" + nextId.ToString() + "&active_tab=" + activeTab + GetNavigatorState() + "&update=yes";
                        }
                    }
                    break;
            }

            if (url != "") Response.Redirect(url);
        }
        // ////////////////////////////////////////////////////////////////////////
        // NAVIGATION EVENTS
        //
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            // Store active tab for postback
            Session["activeTabEmployees"] = "0";
            Session["dialogOpenedEmployees"] = "0";

            string activeTab = hdfActiveTab.Value;
            string url = "";

            switch (e.Item.Value)
            {
                case "mEdit":
                    url = "./employees_edit.aspx?source_page=employees_summary.aspx&employee_id=" + hdfCurrentEmployeeId.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"] + "&active_tab=" + hdfActiveTab.Value;
                    break;

                case "mDelete":
                    url = "./employees_delete.aspx?source_page=employees_summary.aspx&employee_id=" + hdfCurrentEmployeeId.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"] + "&active_tab=" + hdfActiveTab.Value;
                    break;

                case "mLastSearch":
                    url = "./employees_navigator2.aspx?source_page=employees_summary.aspx&employee_id=" + hdfCurrentEmployeeId.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"];
                    break;

                case "mPrevious":
                    // Get previous record
                    int previousId = EmployeeNavigator.GetPreviousId((EmployeeNavigatorTDS)Session["employeeNavigatorTDS"], Int32.Parse(hdfCurrentEmployeeId.Value));
                    if (previousId != Int32.Parse(hdfCurrentEmployeeId.Value))
                    {
                        // Redirect
                        url = "./employees_summary.aspx?source_page=employees_navigator2.aspx&employee_id=" + previousId.ToString() + "&active_tab=" + activeTab + GetNavigatorState();
                    }
                    break;

                case "mNext":
                    // Get next record
                    int nextId = EmployeeNavigator.GetNextId((EmployeeNavigatorTDS)Session["employeeNavigatorTDS"], Int32.Parse(hdfCurrentEmployeeId.Value));
                    if (nextId != Int32.Parse(hdfCurrentEmployeeId.Value))
                    {
                        // Redirect
                        url = "./employees_summary.aspx?source_page=employees_navigator2.aspx&employee_id=" + nextId.ToString() + "&active_tab=" + activeTab + GetNavigatorState();
                    }
                    break;
            }

            if (url != "") Response.Redirect(url);
        }
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            // Store active tab for postback
            Session["activeTabProjects"] = "0";
            Session["dialogOpenedProjects"] = "0";
            Session.Remove("lfsLibraryTDS");
            Session.Remove("fromAttachment");

            string activeTab = hdfActiveTab.Value;
            string url = "";

            switch (e.Item.Value)
            {
                case "mSave":
                    this.Save();
                    break;

                case "mApply":
                    this.Apply();
                    break;

                case "mCancel":
                    this.Cancel();
                    break;

                case "mPrevious":
                    // Get previous record
                    int previousId = ProjectNavigator.GetPreviousId((ProjectNavigatorTDS)Session["lfsProjectNavigatorTDS"], Int32.Parse(hdfProjectId.Value));
                    if (previousId != Int32.Parse(hdfProjectId.Value))
                    {
                        this.Apply();

                        // Redirect
                        url = "./project_edit.aspx?source_page=" + Request.QueryString["source_page"] + "&project_id=" + previousId.ToString() + "&active_tab=" + activeTab + GetNavigatorState() + "&origin=" + (string)ViewState["origin"] + "&data_changed=no&update=yes";
                    }
                    break;

                case "mNext":
                    // Get next record
                    int nextId = ProjectNavigator.GetNextId((ProjectNavigatorTDS)Session["lfsProjectNavigatorTDS"], Int32.Parse(hdfProjectId.Value));
                    if (nextId != Int32.Parse(hdfProjectId.Value))
                    {
                        this.Apply();

                        // Redirect
                        url = "./project_edit.aspx?source_page=" + Request.QueryString["source_page"] + "&project_id=" + nextId.ToString() + "&active_tab=" + activeTab + GetNavigatorState() + "&origin=" + (string)ViewState["origin"] + "&data_changed=no&update=yes";
                    }
                    break;
            }

            if (url != "") Response.Redirect(url);
        }
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            Session["divScrollPosition"] = hdfScrollTop.Value;

            DropDownList ddlOthersFor = (DropDownList)tkrpbLeftMenuOthersTimesheets.FindItemByValue("nbOthersTimesheetsDDL").FindControl("ddlOthersFor");
            Session["ddlOthersForSelectedValue"] = ddlOthersFor.SelectedValue;

            switch (e.Item.Value)
            {
                case "mApprove":
                    int projectTimesSelected = PostPageChanges();

                    if (projectTimesSelected > 0)
                    {
                        Response.Redirect("./timesheet_state.aspx?source_page=timesheet_approve.aspx&others=" + ViewState["others"] + "&employee_id=-1&period_id=-1");
                    }
                    break;

                case "mCancel":
                    Session.Remove("projectTimeIdSelected");
                    Session.Remove("divScrollPosition");
                    Response.Redirect("./../timesheet/timesheet.aspx?source_page=timesheet_approve.aspx&others=" + ViewState["others"] + "&employee_id=" + hdfCurrentEmployeeId.Value + "&period_id=" + ViewState["period_id"]);
                    break;
            }
        }
        // ////////////////////////////////////////////////////////////////////////
        // NAVIGATION EVENTS
        //            
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            string url = "";

            switch (e.Item.Value)
            {
                case "mEdit":
                    url = "./toDoList_edit.aspx?source_page=toDoList_summary.aspx&toDo_id=" + hdfToDoId.Value + "&dashboard=" + hdfDashboard.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"];
                    break;

                case "mAssign":
                    url = "./toDoList_activity.aspx?source_page=toDoList_summary.aspx&toDo_id=" + hdfToDoId.Value + "&action=Assign To User" + "&dashboard="+ hdfDashboard.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"];
                    break;

                case "mComment":
                    url = "./toDoList_activity.aspx?source_page=toDoList_summary.aspx&toDo_id=" + hdfToDoId.Value + "&action=Add Comment" + "&dashboard=" + hdfDashboard.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"];
                    break;

                case "mPutOnHold":
                    url = "./toDoList_activity.aspx?source_page=toDoList_summary.aspx&toDo_id=" + hdfToDoId.Value + "&action=Put On Hold" + "&dashboard=" + hdfDashboard.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"];
                    break;

                case "mComplete":
                    url = "./toDoList_activity.aspx?source_page=toDoList_summary.aspx&toDo_id=" + hdfToDoId.Value + "&action=Complete" + "&dashboard=" + hdfDashboard.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"];
                    break;

                case "mDelete":
                    url = "./toDoList_delete.aspx?source_page=toDoList_summary.aspx&toDo_id=" + hdfToDoId.Value + "&dashboard=no" + GetNavigatorState() + "&update=" + (string)ViewState["update"];
                    break;

                case "mLastSearch":
                    if (Request.QueryString["dashboard"] == "True")
                    {
                        url = "./../../FleetManagement/Dashboard/dashboard_login.aspx?source_page=out";
                    }
                    else
                    {
                        if (Request.QueryString["source_page"] == "toDoList_add.aspx")
                        {
                            url = "./toDoList_navigator.aspx?source_page=out";
                        }

                        if (Request.QueryString["source_page"] == "toDoList_navigator2.aspx")
                        {
                            url = "./toDoList_navigator2.aspx?source_page=toDoList_summary.aspx" + GetNavigatorState() + "&update=yes";
                        }

                        if (Request.QueryString["source_page"] == "toDoList_edit.aspx")
                        {
                            url = "./toDoList_navigator2.aspx?source_page=toDoList_summary.aspx" + GetNavigatorState() + "&update=yes";
                        }

                        if (Request.QueryString["source_page"] == "toDoList_activity.aspx")
                        {
                            url = "./toDoList_navigator2.aspx?source_page=toDoList_summary.aspx" + GetNavigatorState() + "&update=yes";
                        }
                    }

                    break;

                case "mPrevious":
                    if ((Request.QueryString["source_page"] != "toDoList_add.aspx") && (Request.QueryString["source_page"] != "wucMyToDoList.ascx") && (Request.QueryString["source_page"] != "wucToDoListAssignedToMe.ascx"))
                    {
                        if ((ToDoListNavigatorTDS)Session["toDoListNavigatorTDS"] != null)
                        {
                            // Get previous record
                            int previousId = ToDoListNavigator.GetPreviousId((ToDoListNavigatorTDS)Session["toDoListNavigatorTDS"], Int32.Parse(hdfToDoId.Value));
                            if (previousId != Int32.Parse(hdfToDoId.Value))
                            {
                                // Redirect
                                url = "./toDoList_summary.aspx?source_page=toDoList_navigator2.aspx&dashboard=" + hdfDashboard.Value + "&toDo_id=" + previousId.ToString() + GetNavigatorState() + "&update=yes";
                            }
                        }
                    }
                    break;

                case "mNext":
                    if ((Request.QueryString["source_page"] != "toDoList_add.aspx") && (Request.QueryString["source_page"] != "wucMyToDoList.ascx") && (Request.QueryString["source_page"] != "wucToDoListAssignedToMe.ascx"))
                    {
                        if ((ToDoListNavigatorTDS)Session["toDoListNavigatorTDS"] != null)
                        {
                            // Get next record
                            int nextId = ToDoListNavigator.GetNextId((ToDoListNavigatorTDS)Session["toDoListNavigatorTDS"], Int32.Parse(hdfToDoId.Value));
                            if (nextId != Int32.Parse(hdfToDoId.Value))
                            {
                                // Redirect
                                url = "./toDoList_summary.aspx?source_page=toDoList_navigator2.aspx&dashboard=" + hdfDashboard.Value + "&toDo_id=" + nextId.ToString() + GetNavigatorState() + "&update=yes";
                            }
                        }
                    }
                    break;
            }

            if (url != "") Response.Redirect(url);
        }
示例#53
0
 protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)
 {
     Launcher(e.Item.Value);
 }
        protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)
        {
            if (e.Item.Owner is RadMenuItem)
            {
                if (((RadMenuItem)(e.Item.Owner)).Text.Contains("皮肤"))
                {
                    string skinValue = e.Item == null ? "Windows7" : e.Item.Text;
                    SetSkin(skinValue);
                    Session["SkinId"] = skinValue;
                    Response.Write("<script>window.location=window.location;</script>");
                }

                if (((RadMenuItem)(e.Item.Owner)).Text.Contains("功能"))
                {
                    string value = e.Item.Text;
                    if (value.Contains("注销"))
                    {
                        Session.Abandon();
                        ClearPwdCookie();
                        string loginUrl = WebConfigurationManager.AppSettings["LoginPageUrl"].Trim();
                        Response.Redirect(loginUrl);
                    }
                    if (value.Contains("关闭"))
                    {
                        Session.Abandon();
                        Response.Write("<script>if (navigator.userAgent.indexOf(\"MSIE\") > 0) {  " +
                                            "if (navigator.userAgent.indexOf(\"MSIE 6.0\") > 0) {  window.opener = null; window.close(); }" +
                                            "else { window.open('', '_top'); window.top.close();}" +
                                            "}" +
                                            "else if (navigator.userAgent.indexOf(\"Firefox\") > 0) { window.location.href = 'about:blank ';}" +
                                            "else { window.opener = null; window.open('', '_self', '');window.close();}"+
                                            " </script>");
                    }
                }
            }
        }
        // ////////////////////////////////////////////////////////////////////////
        // NAVIGATION EVENTS
        //
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            // Store active tab for postback
            Session["activeTabUnits"] = "0";
            Session["dialogOpenedUnits"] = "0";

            string activeTab = hdfActiveTab.Value;
            string url = "";

            switch (e.Item.Value)
            {
                case "mEdit":
                    url = "./units_edit.aspx?source_page=units_summary.aspx&unit_id=" + hdfUnitId.Value + "&unit_type=" + hdfUnitType.Value + "&unit_state=" + hdfUnitState.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"] + "&active_tab=" + hdfActiveTab.Value;
                    break;

                case "mDelete":
                    url = "./units_delete.aspx?source_page=units_summary.aspx&unit_id=" + hdfUnitId.Value + "&unit_type=" + hdfUnitType.Value + "&unit_state=" + hdfUnitState.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"] + "&active_tab=" + hdfActiveTab.Value;
                    break;

                case "mDispose":
                    url = "./units_state.aspx?source_page=units_summary.aspx&unit_id=" + hdfUnitId.Value + "&unit_type=" + hdfUnitType.Value + "&unit_state=" + hdfUnitState.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"] + "&active_tab=" + hdfActiveTab.Value + "&new_unit_state=Disposed";
                    break;

                case "mActivate":
                    url = "./units_state.aspx?source_page=units_summary.aspx&unit_id=" + hdfUnitId.Value + "&unit_type=" + hdfUnitType.Value + "&unit_state=" + hdfUnitState.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"] + "&active_tab=" + hdfActiveTab.Value + "&new_unit_state=Active";
                    break;

                case "mArchive":
                    url = "./units_state.aspx?source_page=units_summary.aspx&unit_id=" + hdfUnitId.Value + "&unit_type=" + hdfUnitType.Value + "&unit_state=" + hdfUnitState.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"] + "&active_tab=" + hdfActiveTab.Value + "&new_unit_state=Archived";
                    break;

                case "mLastSearch":
                    url = "./units_navigator2.aspx?source_page=units_summary.aspx&unit_id=" + hdfUnitId.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"];
                    break;

                case "mPrevious":
                    // Get previous record
                    int previousId = UnitsNavigator.GetPreviousId((UnitsNavigatorTDS)Session["unitsNavigatorTDS"], Int32.Parse(hdfUnitId.Value));
                    if (previousId != Int32.Parse(hdfUnitId.Value))
                    {
                        // ... Redirect
                        url = "./units_summary.aspx?source_page=units_navigator2.aspx&unit_id=" + previousId.ToString() + "&unit_type=" + hdfUnitType.Value + "&unit_state=" + hdfUnitState.Value + "&active_tab=" + hdfActiveTab.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"];
                    }
                    break;

                case "mNext":
                    // Get next record
                    int nextId = UnitsNavigator.GetNextId((UnitsNavigatorTDS)Session["unitsNavigatorTDS"], Int32.Parse(hdfUnitId.Value));
                    if (nextId != Int32.Parse(hdfUnitId.Value))
                    {
                        // ... Redirect
                        url = "./units_summary.aspx?source_page=units_navigator2.aspx&unit_id=" + nextId.ToString() + "&unit_type=" + hdfUnitType.Value + "&unit_state=" + hdfUnitState.Value + "&active_tab=" + hdfActiveTab.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"];
                    }
                    break;
            }

            if (url != "") Response.Redirect(url);
        }
示例#56
0
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            switch (e.Item.Value)
            {
                case "mDelete":
                    this.Delete();
                    break;

                case "mCancel":
                    string url = "";
                    if (Request.QueryString["source_page"] == "ra_navigator2.aspx")
                    {
                        url = "./ra_navigator2.aspx?source_page=ra_delete.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"];
                    }

                    if (Request.QueryString["source_page"] == "ra_summary.aspx")
                    {
                        url = "./ra_summary.aspx?source_page=ra_delete.aspx&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + GetNavigatorState() + "&update=" + (string)ViewState["update"] + "&asset_id=" + hdfAssetId.Value + "&active_tab=0";
                    }
                    Response.Redirect(url);
                    break;
            }
        }
        // ////////////////////////////////////////////////////////////////////////
        // NAVIGATOR EVENTS
        //
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            string url = null;

            if (e.Item.Value == "mCancel")
            {
                url = "./project_costing_sheets_summary.aspx?source_page=project_costing_sheets_state.aspx&costing_sheet_id=" + hdfCostingSheetId.Value + "&project_id=" + hdfProjectId.Value + "&active_tab=" + (string)ViewState["active_tab"] + GetNavigatorState() + "&origin=" + (string)ViewState["origin"] + "&update=" + (string)ViewState["update"] + "&data_changed=" + hdfDataChanged.Value + "&state=" + (string)ViewState["state"];
                Response.Redirect(url);
            }
            else
            {
                UpdateState();
                UpdateDatabase();

                url = "./project_costing_sheets_summary.aspx?source_page=project_costing_sheets_state.aspx&costing_sheet_id=" + hdfCostingSheetId.Value + "&project_id=" + hdfProjectId.Value + "&active_tab=" + (string)ViewState["active_tab"] + GetNavigatorState() + "&origin=" + (string)ViewState["origin"] + "&update=yes&data_changed=" + hdfDataChanged.Value + "&state=" + (string)ViewState["state"];

                Response.Redirect(url);
            }
        }
        // ////////////////////////////////////////////////////////////////////////
        // NAVIGATION EVENTS
        //
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            string url = "";

            switch (e.Item.Value)
            {
                case "mSave":
                    this.Save();
                    break;

                case "mApply":
                    this.Apply();
                    break;

                case "mCancel":
                    if (Request.QueryString["source_page"] == "subcontractor_hours_navigator2.aspx")
                    {
                        url = "./subcontractor_hours_navigator2.aspx?source_page=subcontractor_hours_edit.aspx" + GetNavigatorState() + "&update=yes";
                    }
                    else
                    {
                        if (Request.QueryString["source_page"] == "subcontractor_hours_summary.aspx")
                        {
                            url = "./subcontractor_hours_summary.aspx?source_page=subcontractor_hours_edit.aspx&project_id=" + hdfProjectId.Value + GetNavigatorState() + "&update=yes" + "&ref_id=" + hdfRefId.Value;
                        }
                    }
                    break;

                case "mPrevious":
                    // Get previous record
                    int previousId = SubcontractorHoursNavigator.GetPreviousId((SubcontractorHoursNavigatorTDS)Session["subcontractorHoursNavigatorTDS"], Int32.Parse(hdfRefId.Value));
                    if (previousId != Int32.Parse(hdfRefId.Value))
                    {
                        // Redirect
                        url = "./subcontractor_hours_edit.aspx?source_page=subcontractor_hours_navigator2.aspx&ref_id=" + previousId.ToString() + "&project_id=" + hdfProjectId.Value + GetNavigatorState();
                    }
                    break;

                case "mNext":
                    // Get next record
                    int nextId = SubcontractorHoursNavigator.GetNextId((SubcontractorHoursNavigatorTDS)Session["subcontractorHoursNavigatorTDS"], Int32.Parse(hdfRefId.Value));
                    if (nextId != Int32.Parse(hdfRefId.Value))
                    {
                        // Redirect
                        url = "./subcontractor_hours_edit.aspx?source_page=subcontractor_hours_navigator2.aspx&ref_id=" + nextId.ToString() + "&project_id=" + hdfProjectId.Value + GetNavigatorState();
                    }
                    break;
            }

            if (url != "") Response.Redirect(url);
        }
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            switch (e.Item.Value)
            {
                case "mCriteria":
                    tdCriteria.Visible = !tdCriteria.Visible;

                    if (hdfFormat.Value != "empty")
                    {
                        Print();
                    }
                    break;

                case "mPrint":
                    hdfFormat.Value = "pdf";
                    Print();
                    break;

                case "mExport":
                    hdfFormat.Value = "excel";
                    Print();
                    break;
            }
        }
        // ////////////////////////////////////////////////////////////////////////
        // NAVIGATION EVENTS
        //
        protected void tkrmTop_ItemClick(object sender, RadMenuEventArgs e)
        {
            switch (e.Item.Value)
            {
                case "mSave":
                    Save();

                    // Redirect
                    string url = "./unitsOfMeasurement_navigator.aspx?source_page=unitsOfMeasurement_navigator.aspx";

                    Response.Redirect(url);
                    break;
            }
        }