public EmployeeGridView(GridViewFilter filter) : base(Descriptor <ProductController> .ControllerName, Descriptor <ProductController> .ActionName(x => x.GridBind(null)), "Employee Grid") { this.IsEditable = true; this.EditView = new GridViewEditView ("Employee Edit", Descriptor <ProductController> .ControllerName, Descriptor <ProductController> .ActionName(x => x.EditEmployee(0)), Descriptor <ProductController> .ActionName(x => x.SaveEmployee(0)) , Descriptor <ProductController> .ActionName(x => x.DeleteEmployee(0)), Descriptor <EmployeeVM> .Name(x => x.EmpID)); this.SetGridFilters(filter); this._MaxRows = 15; }
protected void ButtonSelectFilter_Click(object sender, EventArgs e) { if (changeCssClass(((ListViewDataItem)((Control)sender).Parent).DataItemIndex)) { DivButton.Visible = true; if (((Button)sender).ToolTip.Contains("Causale")) { //((Button)sender).Attributes.Remove("class"); //((Button)sender).Attributes["class"] = "btnSelected"; //string pippo = ((Button)sender).CssClass; //((Button)sender).CssClass = "btnSelected"; //LViewFilter.DataBind(); ((Button)sender).BackColor = System.Drawing.Color.LightBlue; DivSegno.Visible = false; DivStato.Visible = false; DivData.Visible = false; ResponseDataTable responseDataTable = Global.serviceManager.CausaliManager.GetPrime20Causali().ToDataTable(); if (responseDataTable.result.Stato == DL.ItemEventoStato.OK) { DivFiltro.Visible = true; GridViewFilter.DataSource = responseDataTable.dataTable; GridViewFilter.DataBind(); } selectedFilterType = SelectedFilterDataTable_Types.Causale; } else if (((Button)sender).ToolTip.Contains("filiali")) { DivData.Visible = false; DivSegno.Visible = false; DivStato.Visible = false; ResponseDataTable response = Global.serviceManager.FilialiManager.GetFiliali().ToDataTable(); if (response.result.Stato == DL.ItemEventoStato.OK) { DivFiltro.Visible = true; GridViewFilter.DataSource = response.dataTable; GridViewFilter.DataBind(); } selectedFilterType = SelectedFilterDataTable_Types.Filiale; } else if (((Button)sender).ToolTip.Contains("data")) { DivData.Visible = true; DivFiltro.Visible = false; DivSegno.Visible = false; DivStato.Visible = false; selectedFilterType = SelectedFilterDataTable_Types.Data; } else if (((Button)sender).Text.Contains("Segno")) { DivData.Visible = false; DivFiltro.Visible = false; DivSegno.Visible = true; DivStato.Visible = false; selectedFilterType = SelectedFilterDataTable_Types.Segno; } else if (((Button)sender).Text.Contains("Conto")) { DivData.Visible = false; DivFiltro.Visible = false; DivSegno.Visible = false; DivStato.Visible = true; selectedFilterType = SelectedFilterDataTable_Types.StatoConto; } ButtonSelezione.Visible = true; } }
// [OutputCache(Duration =1000)] public ActionResult GridBind(GridViewFilter filter) { EmployeeGridView grid = new EmployeeGridView(filter); return(PartialView(grid._PartialGridView, grid)); }