//------------------------------------------------------------------------------------------- protected void Page_Load(object sender, EventArgs e) { table = DynamicDataRouteHandler.GetRequestMetaTable(Context); WeavverMaster.SetChatVisibility(true); WeavverMaster.FixedWidth = false; WeavverMaster.Width = "100%"; WeavverMaster.FormTitle = table.DisplayName; WeavverMaster.FormDescription = GetPageContent("Logistics/Products/Showcase_Description"); //GridView1.SetMetaTable(table, table.GetColumnValuesFromRoute(Context)); //GridView1.RowCreated += new GridViewRowEventHandler(GridView1_RowCreated); GridDataSource.EntityTypeFilter = table.EntityType.Name; if (table.EntityType.FullName.Contains("Logistics_Products")) { if (LoggedInUser == null || LoggedInUser.OrganizationId != SelectedOrganization.OrganizationId) { GridDataSource.WhereParameters.Add(new Parameter("IsPublic", DbType.Boolean, "True")); } } GridDataSource.WhereParameters.Add(new Parameter("OrganizationId", DbType.Guid, SelectedOrganization.Id.ToString())); GridDataSource.OrderBy = "it.Name"; WeavverMaster.FormTitle = table.DisplayName; GridDataSource.Include = table.ForeignKeyColumnsNames; StoreSpecials.Text = GetPageContent("Sales/Store Specials"); }
//------------------------------------------------------------------------------------------- protected void Page_Load(object sender, EventArgs e) { //HtmlControl wc = (HtmlControl)Master.FindControl("ContentDIV"); //wc.Attributes.CssStyle["padding"] = "0px"; //wc.Attributes.CssStyle["padding-left"] = "0px"; //wc.Attributes.CssStyle["background-color"] = "transparent"; //wc.Attributes.CssStyle["border"] = "none"; if (Roles.IsUserInRole("Administrators")) { AdminLinks.Visible = true; } string pathBase = Request.Url.PathAndQuery; pathBase = pathBase.Substring(0, pathBase.LastIndexOf("/")); string url = pathBase + "/Edit.aspx?Id=" + Request["Id"]; DetailsDataSource.EntityTypeFilter = table.EntityType.Name; WeavverMaster.SetChatVisibility(true); WeavverMaster.FormTitle = "Entry from table " + table.DisplayName; WeavverMaster.FixedWidth = true; WeavverMaster.FormDescription = ""; ActivationRequired = false; string id = Request["id"]; if (id != null) { Guid idGuid = new Guid(id); using (WeavverEntityContainer data = new WeavverEntityContainer()) { item = (from x in data.Logistics_Products where x.Id == idGuid select x).First(); if (item != null) { //Master.FormDescription = description; url = item.Name + " Inquiry"; if (Request["IFrame"] == "true") { url += "&IFrame=true"; } using (WeavverEntityContainer data2 = new WeavverEntityContainer()) { var formDescription = (from x in data2.CMS_Pages where x.Title == "Sales/Header" && x.OrganizationId == SelectedOrganization.Id select x).FirstOrDefault(); if (formDescription != null) { WeavverMaster.FormDescription = formDescription.Page.Replace("{ITEM_NAME}", url); } } InitializeDesign(); } } } //Title = table.DisplayName; DetailsDataSource.Include = table.ForeignKeyColumnsNames; if (!IsPostBack) { if (item != null) { UpdatePage(); } } //Master.DiscussionEnabled = false; }