protected void Page_Load(object sender, EventArgs e) { Title = "Импорт - LeadForce"; access = Access.Check(); gridImports.AddNavigateUrl = UrlsData.AP_ImportAdd(); // gridImports.Actions.Add(new GridAction { Text = "Редактировать", NavigateUrl = string.Format("~/{0}/Imports/Edit/{{0}}", CurrentTab), ImageUrl = "~/App_Themes/Default/images/icoView.png" }); gridImports.SiteID = SiteId; }
protected string GetImportUrl() { var menu = DataManager.Menu.SelectByAccessProfileID(AccessProfile.ID).FirstOrDefault(o => o.ModuleID.HasValue && o.tbl_Module.Name == "Imports"); string url; if (menu != null) { var tab = string.IsNullOrEmpty(menu.TabName) && menu.ParentID.HasValue ? DataManager.Menu.SelectByID(menu.ParentID.Value).TabName : menu.TabName; url = ResolveUrl(string.Format("~/{0}/{1}/Add", tab, menu.tbl_Module.Name)); } else { url = UrlsData.AP_ImportAdd("Settings"); } return(url); }
protected void lbAdd_OnClick(object sender, EventArgs e) { Response.Redirect(UrlsData.AP_ImportAdd()); }