/// <summary> /// GetColumnsToDisplay /// </summary> /// <returns>columns to display</returns> public string GetColumnsToDisplay() { string columnsToDisplay = ""; foreach (FmViewTDS.FmViewDisplayTempRow row in (FmViewTDS.FmViewDisplayTempDataTable)Table) { if (row.Selected) { FmTypeViewDisplay fmTypeViewDisplay = new FmTypeViewDisplay(); fmTypeViewDisplay.LoadByFmTypeDisplayId(row.FmType, row.COMPANY_ID, row.DisplayID); FmTypeViewDisplayGateway fmTypeViewDisplayGateway = new FmTypeViewDisplayGateway(fmTypeViewDisplay.Data); columnsToDisplay = columnsToDisplay + fmTypeViewDisplayGateway.GetName(row.FmType, row.COMPANY_ID, row.DisplayID) + ", "; } } if (columnsToDisplay.Length > 2) { columnsToDisplay = columnsToDisplay.Substring(0, columnsToDisplay.Length - 2); } return columnsToDisplay; }
private string GetNavigatorStateForServices() { // Columns to display int companyId = Int32.Parse(Session["companyID"].ToString()); string fmType = "Services"; string columnsToDisplay = "&columns_to_display="; FmTypeViewDisplay fmTypeViewDisplay = new FmTypeViewDisplay(); columnsToDisplay = columnsToDisplay + fmTypeViewDisplay.GetColumnsByDefault(fmType, companyId, true); // SearchOptions for condition 1 string searchOptions = ""; searchOptions = searchOptions + "&search_ddlCondition1=1"; searchOptions = searchOptions + "&search_tbxCondition1=%"; // For Views searchOptions = searchOptions + "&search_ddlView=-2"; // Other values searchOptions = searchOptions + "&search_state=1"; searchOptions = searchOptions + "&search_sort_by=1"; searchOptions = searchOptions + "&btn_origin=Search"; // Return return columnsToDisplay + searchOptions; }
private string GetColumnsToDisplay() { int companyId = Int32.Parse(hdfCompanyId.Value.Trim()); string fmType = hdfFmType.Value; string columnsToDisplay = "&columns_to_display="; if (hdfBtnOrigin.Value == "Search") { FmTypeViewDisplay fmTypeViewDisplay = new FmTypeViewDisplay(); columnsToDisplay = columnsToDisplay + fmTypeViewDisplay.GetColumnsByDefault(fmType, companyId, true); } return columnsToDisplay; }
private void StepColumnsToDisplayProcessGrid() { FmViewTDS dataSet = new FmViewTDS(); dataSet.LFS_FM_TYPE_VIEW_DISPLAY.Merge(fmTypeViewDisplay, true); FmTypeViewDisplay model = new FmTypeViewDisplay(dataSet); // Update rows if (Session["fmTypeViewDisplayDummy"] == null) { foreach (GridViewRow row in grdColumnsToDisplay.Rows) { int displayId = int.Parse(grdColumnsToDisplay.DataKeys[row.RowIndex].Values["DisplayID"].ToString()); bool selected = ((CheckBox)row.FindControl("cbxSelected")).Checked; model.Update(hdfFmType.Value, int.Parse(hdfCompanyId.Value), displayId, selected); } model.Table.AcceptChanges(); fmTypeViewDisplay = (FmViewTDS.LFS_FM_TYPE_VIEW_DISPLAYDataTable)model.Table; Session["fmTypeViewDisplay"] = fmTypeViewDisplay; } }
private bool StepBeginNext() { Page.Validate("StepBegin"); if (Page.IsValid) { // Load FmViewTDS dataSet = new FmViewTDS(); dataSet.LFS_FM_TYPE_VIEW_DISPLAY.Merge(fmTypeViewDisplay, true); FmTypeViewDisplay model = new FmTypeViewDisplay(dataSet); if (dataSet.LFS_FM_TYPE_VIEW_DISPLAY.Rows.Count <= 0) { model.LoadByFmType(hdfFmType.Value, int.Parse(hdfCompanyId.Value)); } // Store tables fmTypeViewDisplay = (FmViewTDS.LFS_FM_TYPE_VIEW_DISPLAYDataTable)model.Table; Session["fmTypeViewDisplay"] = fmTypeViewDisplay; return true; } return false; }
private string GetColumnsToDisplay() { int companyId = Int32.Parse(hdfCompanyId.Value.Trim()); string fmType = hdfFmType.Value; string columnsToDisplay = "&columns_to_display="; if (hdfBtnOrigin.Value == "Search") { FmTypeViewDisplay fmTypeViewDisplay = new FmTypeViewDisplay(); columnsToDisplay = columnsToDisplay + fmTypeViewDisplay.GetColumnsByDefault(fmType, companyId, true); } else { if (hdfBtnOrigin.Value == "Go") { int viewId = Int32.Parse(ddlView.SelectedValue.Trim()); FmViewDisplay fmViewDisplay = new FmViewDisplay(); columnsToDisplay = columnsToDisplay + fmViewDisplay.GetColumnsToDisplayForViews(viewId, fmType, companyId); } } return columnsToDisplay; }