protected void rgResult_OnFilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { try { IGridDataColumn column = (IGridDataColumn)e.Column; { string dataField = column.GetActiveDataField(); DataView data = new DataView(Lista); DataTable selected = data.ToTable(Lista.TableName, true, dataField); e.ListBox.DataSource = selected; e.ListBox.DataKeyField = dataField; e.ListBox.DataTextField = dataField; e.ListBox.DataValueField = dataField; e.ListBox.DataBind(); } } catch (Exception ex) { if (_lstError == null) { _lstError = new List <string>(); } _lstError.Add(ex.Message); Alerta = _lstError; } }
protected void RadGrid1_FilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { EditingWcfService d = new EditingWcfService(); var y = d.GetCustomers(); if (e.Column is IGridDataColumn) { string dataField = (e.Column as IGridDataColumn).GetActiveDataField(); List <GridDataItem> list = new List <GridDataItem>(); switch (dataField) { case "CustomerID": e.ListBox.DataSource = y.Data.Select(x => new { text = x.CustomerID == "\0" ? "(blank)" : x.CustomerID, value = x.CustomerID }).Distinct().OrderBy(x => x.text); break; case "CompanyName": e.ListBox.DataSource = y.Data.Select(x => new { text = x.CompanyName == "\0" ? "(blank)" : x.CompanyName, value = x.CompanyName }).Distinct().OrderBy(x => x.text); break; case "GrowMeth": e.ListBox.DataSource = y.Data.Select(x => new { text = x.ContactName == "\0" ? "(blank)" : x.ContactName, value = x.ContactName }).Distinct().OrderBy(x => x.text); break; case "TypeCode": e.ListBox.DataSource = y.Data.Select(x => new { text = x.ContactTitle == "\0" ? "(blank)" : x.ContactTitle, value = x.ContactTitle }).Distinct().OrderBy(x => x.text); break; } e.ListBox.DataTextField = "text"; e.ListBox.DataValueField = "value"; e.ListBox.DataBind(); } }
//public static void SetFilterCheckListItems(GridFilterCheckListItemsRequestedEventArgs e) //{ // object dataSource = null; // string dataField = (e.Column as IGridDataColumn).GetActiveDataField(); // var cDormitory_HostBasic = new CDormitory_HostBasic(); // switch (dataField) // { // // Common // case "FatherName": // //var cDormitory_HostBasic = new CDormitory_HostBasic(); // dataSource = cDormitory_HostBasic.GetFatherNameList(); // break; // case "RegistrationDate": // dataSource = cDormitory_HostBasic.GetHostRegistrationDateList(); // break; // } // if (dataSource != null) // SetFilter(e, dataField, dataSource); //} private static void SetFilter(GridFilterCheckListItemsRequestedEventArgs e, string dataField, object dataSource) { e.ListBox.DataSource = dataSource; e.ListBox.DataKeyField = dataField; e.ListBox.DataTextField = dataField; e.ListBox.DataValueField = dataField; e.ListBox.DataBind(); }
private void BindFilterData(string query, string dataTextValue, GridFilterCheckListItemsRequestedEventArgs e) { e.ListBox.DataSource = sqlDB.AdapterGetData(query, CommandType.Text, _sqlParameter); e.ListBox.DataKeyField = dataTextValue; e.ListBox.DataTextField = dataTextValue; e.ListBox.DataValueField = dataTextValue; e.ListBox.DataBind(); _sqlParameter = null; }
protected void RadGrid_FilterCheckListItems(object sender, GridFilterCheckListItemsRequestedEventArgs e) { string DataField = (e.Column as IGridDataColumn).GetActiveDataField(); e.ListBox.DataSource = GetDataTable(DataField); e.ListBox.DataKeyField = DataField; e.ListBox.DataTextField = DataField; e.ListBox.DataValueField = DataField; e.ListBox.DataBind(); }
protected void RadGridaccount_FilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { string DataField = (e.Column as IGridDataColumn).GetActiveDataField(); switch (DataField) { case "Client Name": query = "select company_name as [Client Name] from Company where Status in('Active') and company_id in (select distinct client from clntass where FinanceStatus=1) order by [Client Name]"; BindFilterData(query, "Client Name", e); break; case "Employee Name": query = "select empname as [Employee Name] from Employee where grp<>'ex-employee' and emp_id>1 and dept in (4,1,10) order by empname"; BindFilterData(query, "Employee Name", e); break; case "Project Name": query = "select ProjectName as [Project Name] from Empprojects where projstatus='S' order by projectname"; BindFilterData(query, "Project Name", e); break; case "PracName": query = "select P.PracName as PracName from Group_Practice_Mapping p where p.TA=1 and p.PracName not in ('Enabling') and PracticeId in (select distinct PracticeId from OTR_Proposal) ORDER BY PracName"; BindFilterData(query, "PracName", e); break; case "SalesManager": query = "select empname from Employee where Dept in (5,6) and Grp<>'ex-employee' and EMP_iD in (select distinct salesmanager from OTR_Proposal) order by empname"; BindFilterData(query, "SalesManager", e); break; case "fk_opplocat_customer": query = "select location_name from OpportunityTracker_Location where location_type in('Customer','Both') order by location_name"; BindFilterData(query, "location_name", e); break; case "DeliveryModel": query = "select DeliveryModel from Delivery_Model Where DeliveryModelId in (select distinct BusinessModel from OTR_Proposal) order by DeliveryModel"; BindFilterData(query, "DeliveryModel", e); break; case "fk_oppcategory_id": query = "select category from OpportunityTracker_Category"; BindFilterData(query, "category", e); break; case "Currency": query = "select Distinct RevenueCurrency as RevenueCurrency from OB_POSOWMSA"; BindFilterData(query, "Currency", e); break; } }
protected void gvTickets_OnFilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { try { IGridDataColumn gridDataColumn = e.Column as IGridDataColumn; if (gridDataColumn != null) { string dataField = gridDataColumn.GetActiveDataField(); switch (dataField) { case "IdTicket": e.ListBox.DataSource = Tickets.Select(s => s.IdTicket).Distinct().ToList(); e.ListBox.DataBind(); break; case "Tipificacion": e.ListBox.DataSource = Tickets.Select(s => s.Tipificacion).Distinct().ToList(); e.ListBox.DataBind(); break; case "FechaHora": e.ListBox.DataSource = Tickets.Select(s => s.FechaHora).Distinct().ToList(); e.ListBox.DataBind(); break; case "Estatusticket.Descripcion": e.ListBox.DataSource = Tickets.Select(s => s.EstatusTicket.Descripcion).Distinct().ToList(); e.ListBox.DataBind(); break; } } } catch (Exception ex) { if (_lstError == null) { _lstError = new List <string>(); } _lstError.Add(ex.Message); Alerta = _lstError; } }
protected void grdQuotesAndTrades_FilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { DataTable data = new DataTable(); switch (e.Column.DataField) { case "LoanName": data.Columns.Add("CodeName"); LoansBLL loansBLL = new LoansBLL(); List<Loans> loans = loansBLL.GetLoans(); for (int i = 0; i < loans.Count - 1; i++) { data.Rows.Add(loans[i].CodeName); } e.ListBox.DataSource = data; e.ListBox.DataKeyField = "CodeName"; e.ListBox.DataTextField = "CodeName"; e.ListBox.DataValueField = "CodeName"; e.ListBox.DataBind(); break; default: break; } }
protected void RadGridInvoiceItems_OnFilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { PageBase.SetFilterCheckListItems(e); }
protected void grdLoans_FilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { DataTable data = new DataTable(); switch (e.Column.DataField) { case "CodeName": data.Columns.Add("CodeName"); LoansBLL loansBLL = new LoansBLL(); List<Loans> loans = loansBLL.GetLoans(); for (int i = 0; i <= loans.Count - 1; i++) { data.Rows.Add(loans[i].CodeName); } e.ListBox.DataSource = data; e.ListBox.DataKeyField = "CodeName"; e.ListBox.DataTextField = "CodeName"; e.ListBox.DataValueField = "CodeName"; e.ListBox.DataBind(); break; case "Borrower": data = new DataTable(); data.Columns.Add("Borrower"); BorrowersBL borrowerBL = new BorrowersBL(); List<Borrower> borrower = borrowerBL.GetBorrowers(); for (int i = 0; i < borrower.Count - 1; i++) { data.Rows.Add(borrower[i].Name); } e.ListBox.DataSource = data; e.ListBox.DataKeyField = "Borrower"; e.ListBox.DataTextField = "Borrower"; e.ListBox.DataValueField = "Borrower"; e.ListBox.DataBind(); break; case "Country": data = new DataTable(); data.Columns.Add("Country"); CountryBL CountryBL = new CountryBL(); List<tblCountry> country = CountryBL.GetCountry(); for (int i = 0; i < country.Count - 1; i++) { data.Rows.Add(country[i].Name); } e.ListBox.DataSource = data; e.ListBox.DataKeyField = "Country"; e.ListBox.DataTextField = "Country"; e.ListBox.DataValueField = "Country"; e.ListBox.DataBind(); break; case "CreditRating": data = new DataTable(); data.Columns.Add("CreditRating"); CreditRatingsBL CreditRatingsBL = new CreditRatingsBL(); List<CreditRating> CreditRating = CreditRatingsBL.GetRatings(); for (int i = 0; i < CreditRating.Count - 1; i++) { data.Rows.Add(CreditRating[i].Rating); } e.ListBox.DataSource = data; e.ListBox.DataKeyField = "CreditRating"; e.ListBox.DataTextField = "CreditRating"; e.ListBox.DataValueField = "CreditRating"; e.ListBox.DataBind(); break; case "Sector": data = new DataTable(); data.Columns.Add("Sector"); LoansBLL loansBll = new LoansBLL(); List<Sectors> sector = loansBll.GetSector(); for (int i = 0; i < sector.Count; i++) { if (sector[i] != null) { data.Rows.Add(sector[i].Sector); } } e.ListBox.DataSource = data; e.ListBox.DataKeyField = "Sector"; e.ListBox.DataTextField = "Sector"; e.ListBox.DataValueField = "Sector"; e.ListBox.DataBind(); break; case "PP": data = new DataTable(); data.Columns.Add("PP"); loansBll = new LoansBLL(); List<PP> pp = loansBll.GetPP(); for (int i = 0; i < pp.Count; i++) { if (pp[i] != null) { data.Rows.Add(pp[i].pp); } } e.ListBox.DataSource = data; e.ListBox.DataKeyField = "PP"; e.ListBox.DataTextField = "PP"; e.ListBox.DataValueField = "PP"; e.ListBox.DataBind(); break; case "FixedOrFloating": data = new DataTable(); data.Columns.Add("FixedOrFloating"); loansBll = new LoansBLL(); List<BLL.FixedOrFloating> fof = loansBll.GetFixedFloating(); for (int i = 0; i < fof.Count; i++) { if (fof[i] != null) { data.Rows.Add(fof[i].fixedorfloating); } } e.ListBox.DataSource = data; e.ListBox.DataKeyField = "FixedOrFloating"; e.ListBox.DataTextField = "FixedOrFloating"; e.ListBox.DataValueField = "FixedOrFloating"; e.ListBox.DataBind(); break; case "Notional": data = new DataTable(); data.Columns.Add("Notional"); loansBll = new LoansBLL(); List<BLL.Notional> notional = loansBll.GetNotional(); for (int i = 0; i < notional.Count; i++) { if (notional[i] != null) { data.Rows.Add(notional[i].notional); } } e.ListBox.DataSource = data; e.ListBox.DataKeyField = "Notional"; e.ListBox.DataTextField = "Notional"; e.ListBox.DataValueField = "Notional"; e.ListBox.DataBind(); break; case "Margin": data = new DataTable(); data.Columns.Add("Margin"); loansBll = new LoansBLL(); List<BLL.Margin> margin = loansBll.GetMargin(); for (int i = 0; i < margin.Count; i++) { if (margin[i] != null) { data.Rows.Add(margin[i].margin); } } e.ListBox.DataSource = data; e.ListBox.DataKeyField = "Margin"; e.ListBox.DataTextField = "Margin"; e.ListBox.DataValueField = "Margin"; e.ListBox.DataBind(); break; case "Currency": data = new DataTable(); data.Columns.Add("Currency"); CurrenciesBL currencyBL = new CurrenciesBL(); List<Currency> currency = currencyBL.GetCurrency(); for (int i = 0; i < currency.Count; i++) { if (currency[i].Currancy != null) { data.Rows.Add(currency[i].Currancy); } } e.ListBox.DataSource = data; e.ListBox.DataKeyField = "Currency"; e.ListBox.DataTextField = "Currency"; e.ListBox.DataValueField = "Currency"; e.ListBox.DataBind(); break; case "CouponFrequency": data = new DataTable(); data.Columns.Add("CouponFrequency"); loansBll = new LoansBLL(); List<BLL.CouponFrequency> couponFreq = loansBll.GetCouponFrequency(); for (int i = 0; i < couponFreq.Count; i++) { if (couponFreq[i] != null) { data.Rows.Add(couponFreq[i].coupon); } } e.ListBox.DataSource = data; e.ListBox.DataKeyField = "CouponFrequency"; e.ListBox.DataTextField = "CouponFrequency"; e.ListBox.DataValueField = "CouponFrequency"; e.ListBox.DataBind(); break; case "FacilitySize": data = new DataTable(); data.Columns.Add("FacilitySize"); loansBll = new LoansBLL(); List<BLL.FacilitySize> facility = loansBll.GetFacilitySize(); for (int i = 0; i < facility.Count; i++) { if (facility[i] != null) { data.Rows.Add(facility[i].facility); } } e.ListBox.DataSource = data; e.ListBox.DataKeyField = "FacilitySize"; e.ListBox.DataTextField = "FacilitySize"; e.ListBox.DataValueField = "FacilitySize"; e.ListBox.DataBind(); break; case "CreditRatingModys": data = new DataTable(); data.Columns.Add("CreditRatings"); loansBll = new LoansBLL(); List<CreditRating> creditRatingModdys = loansBll.GetCreditRatingModdys(); for (int i = 0; i < creditRatingModdys.Count; i++) { data.Rows.Add(creditRatingModdys[i].Rating); } e.ListBox.DataSource = data; e.ListBox.DataKeyField = "CreditRatings"; e.ListBox.DataTextField = "CreditRatings"; e.ListBox.DataValueField = "CreditRatings"; e.ListBox.DataBind(); break; case "CreditRatingSPs": data = new DataTable(); data.Columns.Add("CreditRatings"); loansBll = new LoansBLL(); List<CreditRating> creditRatingSPs = loansBll.GetCreditRatingSP(); for (int i = 0; i < creditRatingSPs.Count; i++) { data.Rows.Add(creditRatingSPs[i].Rating); } e.ListBox.DataSource = data; e.ListBox.DataKeyField = "CreditRatings"; e.ListBox.DataTextField = "CreditRatings"; e.ListBox.DataValueField = "CreditRatings"; e.ListBox.DataBind(); break; case "CreditRatingFitch": data = new DataTable(); data.Columns.Add("CreditRatings"); loansBll = new LoansBLL(); List<CreditRating> creditRatingFitch = loansBll.GetCreditRatingFitch(); for (int i = 0; i < creditRatingFitch.Count; i++) { data.Rows.Add(creditRatingFitch[i].Rating); } e.ListBox.DataSource = data; e.ListBox.DataKeyField = "CreditRatings"; e.ListBox.DataTextField = "CreditRatings"; e.ListBox.DataValueField = "CreditRatings"; e.ListBox.DataBind(); break; case "CreditRatingING": data = new DataTable(); data.Columns.Add("CreditRatings"); loansBll = new LoansBLL(); List<CreditRating> creditRatingING = loansBll.GetCreditRatingING(); for (int i = 0; i < creditRatingING.Count; i++) { data.Rows.Add(creditRatingING[i].Rating); } e.ListBox.DataSource = data; e.ListBox.DataKeyField = "CreditRatings"; e.ListBox.DataTextField = "CreditRatings"; e.ListBox.DataValueField = "CreditRatings"; e.ListBox.DataBind(); break; //case "NoOfAmortisation": // data = new DataTable(); // data.Columns.Add("NoOfAmortrization"); // loansBll = new LoansBLL(); // List<BLL.NoOfAmortrization> noOfAmort = loansBll.GetNoOfAmortrization(); // for (int i = 0; i < noOfAmort.Count; i++) // { // if (noOfAmort[i] != null) // { // data.Rows.Add(noOfAmort[i].noofAmort); // } // } // e.ListBox.DataSource = data; // e.ListBox.DataKeyField = "noofAmort"; // e.ListBox.DataTextField = "noofAmort"; // e.ListBox.DataValueField = "noofAmort"; // e.ListBox.DataBind(); // break; case "StructureID": data = new DataTable(); data.Columns.Add("StructureID"); loansBll = new LoansBLL(); List<BLL.StructureID> structure = loansBll.GetStructureID(); for (int i = 0; i < structure.Count; i++) { if (structure[i] != null) { data.Rows.Add(structure[i].structureID); } } e.ListBox.DataSource = data; e.ListBox.DataKeyField = "StructureID"; e.ListBox.DataTextField = "StructureID"; e.ListBox.DataValueField = "StructureID"; e.ListBox.DataBind(); break; default: break; } //// sector //data = new DataTable(); //data.Columns.Add("CreditRating"); //CreditRatingsBL CreditRatingsBL = new CreditRatingsBL(); //List<CreditRating> CreditRating = CreditRatingsBL.GetRatings(); //for (int i = 0; i < CreditRating.Count - 1; i++) //{ // data.Rows.Add(CreditRating[i].Rating); //} //e.ListBox.DataSource = data; //e.ListBox.DataKeyField = "CreditRating"; //e.ListBox.DataTextField = "CreditRating"; //e.ListBox.DataValueField = "CreditRating"; //e.ListBox.DataBind(); }
protected void RadGridPromotionHistory_OnFilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { SetFilterCheckListItems(e); }
protected void RadGridPackageProgramDetail_OnFilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { SetFilterCheckListItems(e); }
protected void Grid_StudentList_OnFilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { SetFilterCheckListItems(e); }
protected void RadGridVacationSchema_OnFilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { SetFilterCheckListItems(e); }
protected void RadGridScholarshipHistory_OnFilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { SetFilterCheckListItems(e); }
protected void grdQuotesAndTrades_FilterCheckListItemsRequested1(object sender, GridFilterCheckListItemsRequestedEventArgs e) { }
public static void SetFilterCheckListItems(GridFilterCheckListItemsRequestedEventArgs e) { object dataSource = null; string dataField = (e.Column as IGridDataColumn).GetActiveDataField(); switch (dataField) { // Common case "SiteName": dataSource = new CSite().GetSiteNameList(); break; case "SiteLocationName": dataSource = new CSiteLocation().GetSiteLocationNameList(); break; case "CountryName": dataSource = new CCountry().GetCountryNameList(); break; case "AgencyName": dataSource = new CAgency().GetAgencyNameList(); break; case "ProgramName": dataSource = new CProgram().GetProgramNameList(); break; case "InvoiceCoaItemId": dataSource = new CInvoiceCoaItem().GetInvoiceCoaItemIdNameList(); break; case "InvoiceName": dataSource = new CProgram().GetInvoiceNameList(); break; case "StudentName": dataSource = new CStudent().GetStudentNameList(); break; case "UserName": dataSource = new CUser().GetUserNameList(); break; case "Status": dataSource = new CApproval().GetStatusNameList(); break; case "ApprovalUserName": dataSource = new CUser().GetApprovalUserNameList(); break; case "InstructorName": dataSource = new CUser().GetInstructorNameList(); break; case "ProgramStatusName": dataSource = new CProgramRegistration().GetProgramStatusList(); break; // Dashboard case "Type": dataSource = new CApproval().GetApprovalTypeNameList(); break; // Invoice case "InvoiceType": dataSource = new CInvoice().GetInvoiceTypeList(); break; case "InvoiceStatus": dataSource = new CInvoice().GetInvoiceStatusList(); break; // Deposit case "DepositStatus": dataSource = new CDeposit().GetDepositStatusNameList(); break; case "DepositBank": dataSource = new CDeposit().GetDepositBankNameList(); break; case "PaidMethod": dataSource = new CDeposit().GetPaidMethodNameList(); break; case "ExtraTypeName": dataSource = new CDeposit().GetExtraTypeNameList(); break; // CreditMemo case "CreditMemoType": dataSource = new CCreditMemo().GetCreditMemoTypeNameList(); break; case "PayoutMethodName": dataSource = new CCreditMemoPayout().GetPayoutMethodNameList(); break; // Academic case "FacultyName": dataSource = new CFaculty().GetFacultyNameList(); break; case "ProgramGroupName": dataSource = new CProgramGroup().GetProgramGroupNameList(); break; // Vacation case "VacationType": dataSource = new CVacation().GetVacationTypeNameList(); break; // User case "CreatedUserName": dataSource = new CUser().GetCreatedUserNameList(); break; case "UpdatedUserName": dataSource = new CUser().GetUpdatedUserNameList(); break; case "PositionName": dataSource = new CUser().GetPositionNameList(); break; case "Email": dataSource = new CUser().GetEmailNameList(); break; case "LoginId": dataSource = new CUser().GetLoginIdNameList(); break; // PurchaseOrder case "PurchaseOrderTypeName": dataSource = new CPurchaseOrder().GetPurchaseOrderTypeNameList(); break; case "PriorityTypeName": dataSource = new CPurchaseOrder().GetPriorityTypeNameList(); break; case "ReviewTypeName": dataSource = new CPurchaseOrder().GetReviewTypeNameList(); break; ////Invoice# //case "SchoolName": // dataSource = new CSite().GetSiteNameList(); // break; // Inventory case "AssignedUserName": dataSource = new CUser().GetAssignedUserNameList(); break; case "InventoryCategoryName": dataSource = new CInventory().GetInventoryCategoryNameList(); break; case "InventoryCategoryItemName": dataSource = new CInventory().GetInventoryCategoryItemNameList(); break; case "ConditionName": dataSource = new CInventory().GetConditionNameList(); break; case "InUseName": dataSource = new CInventory().GetInUseNameList(); break; } if (dataSource != null) { SetFilter(e, dataField, dataSource); } }
protected void RadGridRecievedMessage_OnFilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { SetFilterCheckListItems(e); }
protected void RadGridDepositPayment_OnFilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { PageBase.SetFilterCheckListItems(e); }
protected void RadGridSiteLocationUser_OnFilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { SetFilterCheckListItems(e); }
protected void GridBulletinBoard_OnFilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { SetFilterCheckListItems(e); }
protected void RadGridUserStatus_OnFilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { SetFilterCheckListItems(e);; }
protected void RadGridProgramClass_OnFilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { SetFilterCheckListItems(e); }
protected void RadGridAgency_OnFilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { SetFilterCheckListItems(e); }
protected void CreditMemoPayoutHistory_OnFilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { SetFilterCheckListItems(e); }