/// <summary>Begin page running after session validations</summary> private void Go() { this.user = (ApplicationUser)this.Session["User"]; this.Dictionary = this.Session["Dictionary"] as Dictionary <string, string>; this.master = this.Master as Giso; this.master.AdminPage = true; this.master.AddBreadCrumb("Item_CostDefinition"); this.master.Titulo = "Item_CostDefinitions"; this.RenderDepartmentData(); if (this.user.HasGrantToWrite(ApplicationGrant.Department)) { this.master.ButtonNewItem = UIButton.NewItemButton("Item_CostDefinition_Button_New", "CostDefinitionView.aspx"); } this.DataHeader = new UIDataHeader { Id = "ListDataHeader", ActionsItem = 2 }; this.DataHeader.AddItem(new UIDataHeaderItem { Id = "th0", HeaderId = "ListDataHeader", DataId = "ListDataTable", Text = this.Dictionary["Item_CostDefinition_ListHeader_Name"], Sortable = true, Filterable = true }); this.DataHeader.AddItem(new UIDataHeaderItem { Id = "th1", HeaderId = "ListDataHeader", DataId = "ListDataTable", Text = this.Dictionary["Item_CostDefinition_ListHeader_Amount"], HiddenMobile = true }); }
public void AddHeader(UIDataHeader header) { if (this.headers == null) { this.headers = new List <UIDataHeader>(); } this.headers.Add(header); }
/// <summary>Begin page running after session validations</summary> private void Go() { this.user = Session["User"] as ApplicationUser; this.Dictionary = Session["Dictionary"] as Dictionary <string, string>; this.master = this.Master as Giso; this.master.AdminPage = true; this.master.AddBreadCrumb("Item_Alerts"); this.master.Titulo = "Item_Alerts"; this.RenderAlerts(); this.DataHeader = new UIDataHeader { Id = "ListDataHeader", ActionsItem = 2 }; this.DataHeader.AddItem(new UIDataHeaderItem { Id = "th0", HeaderId = "ListDataHeader", DataId = "ListDataTable", Text = this.Dictionary["Item_Alert_ListHeader_Reason"], Sortable = true, Filterable = true }); this.DataHeader.AddItem(new UIDataHeaderItem { Id = "th1", HeaderId = "ListDataHeader", DataId = "ListDataTable", Text = this.Dictionary["Item_Alert_ListHeader_Description"], HiddenMobile = true }); }
/// <summary>Begin page running after session validations</summary> private void Go() { this.user = (ApplicationUser)Session["User"]; this.Dictionary = Session["Dictionary"] as Dictionary <string, string>; // Security access control if (!this.user.HasGrantToRead(ApplicationGrant.Provider)) { this.Response.Redirect("NoPrivileges.aspx", Constant.EndResponse); Context.ApplicationInstance.CompleteRequest(); } this.master = this.Master as Giso; this.master.AdminPage = true; string serverPath = this.Request.Url.AbsoluteUri.Replace(this.Request.RawUrl.Substring(1), string.Empty); this.master.AddBreadCrumb("Item_Providers"); this.master.Titulo = "Item_Providers"; this.RenderProvidersData(); if (this.user.HasGrantToWrite(ApplicationGrant.Department)) { this.master.ButtonNewItem = UIButton.NewItemButton("Item_Provider_Btn_New", "ProvidersView.aspx"); } this.DataHeader = new UIDataHeader { Id = "ListDataHeader", ActionsItem = 2 }; this.DataHeader.AddItem(new UIDataHeaderItem { Id = "th0", HeaderId = "ListDataHeader", DataId = "ListDataTable", Text = this.Dictionary["Item_Customer_ListHeader_Name"], Sortable = true, Filterable = true }); }
/// <summary>Begin page running after session validations</summary> private void Go() { this.user = (ApplicationUser)Session["User"]; this.dictionary = Session["Dictionary"] as Dictionary <string, string>; // Security access control if (!this.user.HasGrantToRead(ApplicationGrant.Provider)) { this.Response.Redirect("NoPrivileges.aspx", Constant.EndResponse); Context.ApplicationInstance.CompleteRequest(); } this.master = this.Master as Giso; this.master.AdminPage = true; string serverPath = this.Request.Url.AbsoluteUri.Replace(this.Request.RawUrl.Substring(1), string.Empty); this.master.AddBreadCrumb("Item_Unidades"); this.master.Titulo = "Item_Unidades"; this.RenderUnidadData(); if (this.user.HasGrantToWrite(ApplicationGrant.Department)) { this.master.ButtonNewItem = new SbrinnaCoreFramework.UI.UIButton { Text = this.dictionary["Item_Unidad_Btn_New"], Action = "success", Icon = "icon-plus", Id = "BtnNewUnidad" }; } this.DataHeader = new UIDataHeader { Id = "ListDataHeader", ActionsItem = 2 }; this.DataHeader.AddItem(new UIDataHeaderItem { Id = "th0", HeaderId = "ListDataHeader", DataId = "ListDataTable", Text = this.dictionary["Item_Unidad_ListHeader_Description"], Sortable = true, Filterable = true }); }
/// <summary>Begin page running after session validations</summary> private void Go() { this.Dictionary = Session["Dictionary"] as Dictionary <string, string>; this.company = this.Session["Company"] as Company; this.master = this.Master as Giso; this.master.AdminPage = true; string serverPath = this.Request.Url.AbsoluteUri.Replace(this.Request.RawUrl.Substring(1), string.Empty); this.master.AddBreadCrumb("Item_Equipments"); this.master.Titulo = "Item_Equipments"; if (this.user.HasGrantToWrite(ApplicationGrant.Equipment)) { this.master.ButtonNewItem = UIButton.NewItemButton("Item_Equipment_Button_New", "EquipmentView.aspx"); } this.DataHeader = new UIDataHeader { Id = "ListDataHeader", ActionsItem = 2 }; this.DataHeader.AddItem(new UIDataHeaderItem { Id = "th0", HeaderId = "ListDataHeader", DataId = "ListDataTable", Text = this.Dictionary["Item_Equipment_Header_Code"], Sortable = true, Filterable = true, HiddenMobile = true }); this.DataHeader.AddItem(new UIDataHeaderItem { Id = "th1", HeaderId = "ListDataHeader", DataId = "ListDataTable", Text = this.Dictionary["Item_Equipment_Header_Description"], Sortable = true, Filterable = true }); this.DataHeader.AddItem(new UIDataHeaderItem { Id = "th2", HeaderId = "ListDataHeader", DataId = "ListDataTable", Text = this.Dictionary["Item_Equipment_Header_Location"], Sortable = true, HiddenMobile = true }); this.DataHeader.AddItem(new UIDataHeaderItem { Id = "th3", HeaderId = "ListDataHeader", DataId = "ListDataTable", Text = this.Dictionary["Item_Equipment_Header_Responsible"], Sortable = true, HiddenMobile = true }); bool grantWrite = UserGrant.HasWriteGrant(this.user.Grants, ApplicationGrant.Equipment); bool grantDelete = UserGrant.HasDeleteGrant(this.user.Grants, ApplicationGrant.Equipment); bool grantEmployee = UserGrant.HasReadGrant(this.user.Grants, ApplicationGrant.Employee); bool first = true; var equipments = Equipment.ByCompany(this.company); var searchList = new List <string>(); foreach (var equipment in equipments) { if (!searchList.Contains(equipment.Code)) { searchList.Add(equipment.Code); } if (!searchList.Contains(equipment.Description)) { searchList.Contains(equipment.Description); } } searchList.Sort(); var sea = new StringBuilder(); foreach (string item in searchList) { if (first) { first = false; } else { sea.Append(","); } if (item.IndexOf("\"") != -1) { sea.Append(string.Format(@"'{0}'", item)); } else { sea.Append(string.Format(@"""{0}""", item)); } } this.master.SearcheableItems = sea.ToString(); this.RenderCosts(); }