public void FillCombobox(Telerik.Web.UI.RadComboBox RCBPurchaseOrder, string argClientCode, string argInBDeliveryDocTypeCode, string argToDocType) { RCBPurchaseOrder.Items.Clear(); foreach (DataRow dr in GetPurchaseOrder4InBDC(argClientCode, argInBDeliveryDocTypeCode, argToDocType).Tables[0].Rows) { String itemText = dr["PODocCode"].ToString().Trim(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["PODocCode"].ToString().Trim() }; itemCollection.Attributes.Add("PODocCode", dr["PODocCode"].ToString().Trim()); itemCollection.Attributes.Add("PODocDate", dr["PODocumentDate"].ToString()); itemCollection.Attributes.Add("POTypeCode", dr["POTypeCode"].ToString()); itemCollection.Attributes.Add("VendorCode", dr["VendorCode"].ToString()); itemCollection.Attributes.Add("VendorName", dr["Name1"].ToString()); itemCollection.Attributes.Add("PurchaseOrgCode", dr["PurchaseOrgCode"].ToString()); itemCollection.Attributes.Add("CompanyCode", dr["CompanyCode"].ToString()); itemCollection.Attributes.Add("SourcePlantCode", dr["SourcePlantCode"].ToString()); itemCollection.Attributes.Add("POStatus", dr["POStatus"].ToString()); RCBPurchaseOrder.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox4BD(Telerik.Web.UI.RadComboBox RCBSalesOrder, string argClientCode, string argBillingDocTypeCode, string argToDocType) { RCBSalesOrder.Items.Clear(); foreach (DataRow dr in GetSalesOrder4BD(argClientCode, argBillingDocTypeCode, argToDocType).Tables[0].Rows) { String itemText = dr["SODocCode"].ToString().Trim(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["SODocCode"].ToString().Trim() }; itemCollection.Attributes.Add("SODocCode", dr["SODocCode"].ToString().Trim()); itemCollection.Attributes.Add("SODocDate", dr["SODocDate"].ToString()); itemCollection.Attributes.Add("SOTypeCode", dr["SOTypeCode"].ToString()); itemCollection.Attributes.Add("BillToParty", dr["BillToParty"].ToString()); itemCollection.Attributes.Add("BillToPartyName", dr["BillToPartyName"].ToString()); itemCollection.Attributes.Add("DocumentCode", dr["DocumentCode"].ToString().Trim()); itemCollection.Attributes.Add("SalesOrganizationCode", dr["SalesOrganizationCode"].ToString()); itemCollection.Attributes.Add("DistChannelCode", dr["DistChannelCode"].ToString()); itemCollection.Attributes.Add("DivisionCode", dr["DivisionCode"].ToString()); itemCollection.Attributes.Add("SOStatus", dr["SOStatus"].ToString()); RCBSalesOrder.Items.Add(itemCollection); itemCollection.DataBind(); } }
protected void cmbCentro_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { try { capascccmex.biz.centro obj = new capascccmex.biz.centro(); List <capascccmex.metadatos.centro> listaCampos = new List <capascccmex.metadatos.centro>(); listaCampos = obj.GetBizCentro(null, 0, 0); RadComboBox rcmb = (RadComboBox)sender; foreach (var _row in listaCampos) { RadComboBoxItem item = new RadComboBoxItem(); //{ //Text=_row.Nombre,Value=_row.IdPerito.ToString() //}; item.Text = _row.Centro; item.Value = _row.IdCentro.ToString(); string _centro = _row.Centro; string _idcentro = _row.IdCentro.ToString(); //string _rf = _row.RegimenFiscal; item.Attributes.Add("Codigo", _idcentro); item.Attributes.Add("Nombre", _centro); //item.Attributes.Add("RegimenFiscal", _rf); rcmb.Items.Add(item); item.DataBind(); } } catch (Exception ex) { windowManager1.RadAlert("Error: " + ex.Message.ToString(), 400, 100, "Cargando Centros", null); } }
protected void RadComboBoxFirma_ItemsRequested(object sender, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e) { if (e.Text.Length > 3) { string sqlSelectCommand = ""; sqlSelectCommand = "SELECT [UserID],[UserName] from [telerik_Users] ORDER BY [UserName]"; SqlDataAdapter adapter = new SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings["KalData"].ConnectionString); adapter.SelectCommand.Parameters.AddWithValue("@text", e.Text); DataTable dataTable = new DataTable(); adapter.Fill(dataTable); RadComboBoxFirma.Items.Clear(); foreach (DataRow dataRow in dataTable.Rows) { string UserName = ""; RadComboBoxItem item = new RadComboBoxItem(); item.Text = (string)dataRow["UserName"].ToString(); item.Value = dataRow["UserId"].ToString(); UserName = (string)dataRow["UserName"]; if (dataRow["UserName"] != System.DBNull.Value) { UserName = (string)dataRow["UserName"]; } //item.Attributes.Add("FIRMAADI", FirmaAdi); //item.Attributes.Add("IL_ILCE", IlIlce); RadComboBoxFirma.Items.Add(item); item.DataBind(); } Label lbl = (Label)RadComboBoxFirma.Footer.FindControl("lblBulunanKayitSayisi"); lbl.Text = "Bulunan kayıt sayısı:" + " " + dataTable.Rows.Count.ToString(); } }
protected void ddlStakeHolder_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { try { var stockholderTypeId = ddlStakeHolderType.SelectedValue.Trim(); if (stockholderTypeId == "1" || stockholderTypeId == "14") { //string sqlSelectCommand = @"Select InstitutionID,InstitutionName from Institution_Master_Info"; //SqlDataAdapter adapter = new SqlDataAdapter(sqlSelectCommand, connectionString); ////adapter.SelectCommand.Parameters.AddWithValue("@text", e.Text); //DataTable dataTable = new DataTable(); //adapter.Fill(dataTable); DataTable dataTable = pbUtility.GetDataByProc("sp_getInstitutionMaster"); foreach (DataRow dataRow in dataTable.Rows) { RadComboBoxItem item = new RadComboBoxItem(); item.Text = (string)dataRow["InstitutionName"]; item.Value = dataRow["InstitutionID"].ToString(); item.Attributes.Add("InstitutionName", dataRow["InstitutionName"].ToString()); ddlStakeHolder.Items.Add(item); item.DataBind(); } } else { ClearStakeHolder(); } } catch (Exception ex) { Alert.Show(ex.Message); } }
protected void RadComboBoxFirma_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e) { //string BolgeKodu = Session["BolgeKodu"].ToString(); //string bak = e.Text; if (e.Text.Length > 2) { string BolgeKodu = intBolgeKodu.ToString(); string sqlSelectCommand = ""; sqlSelectCommand = "SELECT [FIRMAID],[MUSTNO], [FIRMAADI], [IL_ILCE] from [firma] WHERE [FIRMAADI] LIKE '%'+ @text + '%' and SILINDI=0 and BOLGEKODU=" + BolgeKodu + " ORDER BY [FIRMAADI]"; SqlDataAdapter adapter = new SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings["KalData"].ConnectionString); adapter.SelectCommand.Parameters.AddWithValue("@text", e.Text); DataTable dataTable = new DataTable(); adapter.Fill(dataTable); RadComboBoxFirma.Items.Clear(); foreach (DataRow dataRow in dataTable.Rows) { string IlIlce = ""; RadComboBoxItem item = new RadComboBoxItem(); item.Text = (string)dataRow["MUSTNO"].ToString(); item.Value = dataRow["FIRMAID"].ToString(); string FirmaAdi = (string)dataRow["FIRMAADI"]; if (dataRow["IL_ILCE"] != System.DBNull.Value) { IlIlce = (string)dataRow["IL_ILCE"]; } item.Attributes.Add("FIRMAADI", FirmaAdi); item.Attributes.Add("IL_ILCE", IlIlce); RadComboBoxFirma.Items.Add(item); item.DataBind(); } Label lbl = (Label)RadComboBoxFirma.Footer.FindControl("lblBulunanKayitSayisi"); lbl.Text = "Bulunan kayıt sayısı:" + " " + dataTable.Rows.Count.ToString(); } }
protected void RadComboBox1_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { string sql = "SELECT [SupplierID], [CompanyName], [ContactName], [City] FROM [Suppliers] WHERE CompanyName LIKE @CompanyName + '%'"; SqlDataAdapter adapter = new SqlDataAdapter(sql, ConfigurationManager.ConnectionStrings["TelerikVSXConnectionString"].ConnectionString); adapter.SelectCommand.Parameters.AddWithValue("@CompanyName", e.Text); DataTable dt = new DataTable(); adapter.Fill(dt); RadComboBox comboBox = (RadComboBox)sender; // Clear the default Item that has been re-created from ViewState at this point. comboBox.Items.Clear(); foreach (DataRow row in dt.Rows) { RadComboBoxItem item = new RadComboBoxItem(); item.Text = row["CompanyName"].ToString(); item.Value = row["SupplierID"].ToString(); item.Attributes.Add("ContactName", row["ContactName"].ToString()); comboBox.Items.Add(item); item.DataBind(); } }
public static void FillDropdownList(RadComboBox rcbMe, DataTable contents, string textField, string valueField, bool AddBlankItem, string valueSelected) { RadComboBoxItem itemEmpty = new RadComboBoxItem(); rcbMe.Items.Clear(); if (AddBlankItem == true) { itemEmpty.Text = "All"; itemEmpty.Value = "All"; rcbMe.Items.Add(itemEmpty); itemEmpty.DataBind(); } foreach (DataRow dataRow in contents.Rows) { RadComboBoxItem item = new RadComboBoxItem(); item.Text = (string)dataRow[textField]; item.Value = dataRow[valueField].ToString(); rcbMe.Items.Add(item); item.DataBind(); } if (valueSelected != null) { rcbMe.SelectedValue = valueSelected; } }
protected void ddlStakeHolderType_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { try { //string sqlSelectCommand = @"Select StakeholderTypeID,StakeholderTypeName from [dbo].[CmnStakeholderType]"; //SqlDataAdapter adapter = new SqlDataAdapter(sqlSelectCommand, connectionString); ////adapter.SelectCommand.Parameters.AddWithValue("@text", e.Text); //DataTable dataTable = new DataTable(); //adapter.Fill(dataTable); //Hashtable ht = new Hashtable(); //ht.Add("EnterpriseCategoryId", 1); // 1 for Yarn DataTable dataTable = pbUtility.GetDataByProc("sp_getStakeholderType"); foreach (DataRow dataRow in dataTable.Rows) { RadComboBoxItem item = new RadComboBoxItem(); item.Text = (string)dataRow["StakeholderTypeName"]; item.Value = dataRow["StakeholderTypeID"].ToString(); item.Attributes.Add("StakeholderTypeName", dataRow["StakeholderTypeName"].ToString()); ddlStakeHolderType.Items.Add(item); item.DataBind(); } } catch (Exception ex) { Alert.Show(ex.Message); } }
protected void RadComboBoxFirma_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e) { if (e.Text.Length > 3) { using (Service1Client client = new Service1Client()) { intBolgeKodu = client.BolgeKoduDon(Context.User.Identity.Name); } string BolgeKodu = intBolgeKodu.ToString(); string sqlSelectCommand = ""; sqlSelectCommand = "SELECT [FIRMAID],[MUSTNO], [FIRMAADI], [IL_ILCE] from [firma] WHERE [FIRMAADI] LIKE '%'+ @text + '%' and SILINDI=0 and BOLGEKODU=" + BolgeKodu + " ORDER BY [FIRMAADI]"; SqlDataAdapter adapter = new SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings["KalData"].ConnectionString); adapter.SelectCommand.Parameters.AddWithValue("@text", e.Text); DataTable dataTable = new DataTable(); adapter.Fill(dataTable); RadComboBoxFirma.Items.Clear(); foreach (DataRow dataRow in dataTable.Rows) { string IlIlce = ""; RadComboBoxItem item = new RadComboBoxItem(); item.Text = (string)dataRow["MUSTNO"].ToString(); item.Value = dataRow["FIRMAID"].ToString(); string FirmaAdi = (string)dataRow["FIRMAADI"]; if (dataRow["IL_ILCE"] != System.DBNull.Value) { IlIlce = (string)dataRow["IL_ILCE"]; } item.Attributes.Add("FIRMAADI", FirmaAdi); item.Attributes.Add("IL_ILCE", IlIlce); RadComboBoxFirma.Items.Add(item); item.DataBind(); } } }
protected void RadComboBoxCihaz_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e) { RadComboBoxCihaz.Items.Clear(); string sqlSelectCommand = ""; sqlSelectCommand = "SELECT [ID],[CIHAZADI], [LAB] from [cihaz] WHERE [CIHAZADI] LIKE '%'+ @text + '%' ORDER BY [CIHAZADI]"; SqlDataAdapter adapter = new SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings["KalData"].ConnectionString); adapter.SelectCommand.Parameters.AddWithValue("@text", e.Text); DataTable dataTable = new DataTable(); adapter.Fill(dataTable); RadComboBoxCihaz.Items.Clear(); foreach (DataRow dataRow in dataTable.Rows) { string Lab = ""; RadComboBoxItem item = new RadComboBoxItem(); item.Text = (string)dataRow["CIHAZADI"].ToString(); item.Value = dataRow["ID"].ToString(); Lab = (string)dataRow["LAB"]; item.Attributes.Add("LAB", Lab); RadComboBoxCihaz.Items.Add(item); item.DataBind(); } }
private void CarregueCombo() { foreach (EnumeradorFiltroPatente enumerador in EnumeradorFiltroPatente.ObtenhaTodos()) { var item = new RadComboBoxItem(enumerador.Descricao, enumerador.Id.ToString()); item.Attributes.Add("Codigo", enumerador.Id.ToString()); cboFiltroPatente.Items.Add(item); item.DataBind(); } }
private void CarregueCombo() { foreach (var mes in Mes.ObtenhaTodas()) { var item = new RadComboBoxItem(mes.Descricao, mes.Codigo.ToString()); item.Attributes.Add("Codigo", mes.Codigo.ToString()); cboMes.Items.Add(item); item.DataBind(); } }
public static void ComboBox_BindLevelData(RadComboBox cmb) { string[] levelText = { "请选择", "低", "中", "高" }; for (int i = 0; i < levelText.Length; i++) { RadComboBoxItem item = new RadComboBoxItem(); item.Value = i.ToString(); item.Text = levelText[i]; cmb.Items.Add(item); item.DataBind(); } }
private void CarregueCombo() { foreach (var apresentacao in Apresentacao.ObtenhaTodas()) { var item = new RadComboBoxItem(apresentacao.Nome, apresentacao.Codigo.ToString()); item.Attributes.Add("Codigo", apresentacao.Codigo.ToString()); cboApresentacao.Items.Add(item); item.DataBind(); } }
protected void cboTitular_OnItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { using (var servico = FabricaGenerica.GetInstancia().CrieObjeto<IServicoDeTitular>()) { cboTitular.Items.Clear(); foreach (var titular in servico.ObtenhaPorNomeComoFiltro(e.Text, 50)) { var item = new RadComboBoxItem(titular.Pessoa.Nome, titular.Pessoa.ID.ToString()); item.Attributes.Add("DataDoCadastro", titular.DataDoCadastro.Value.ToString("dd/MM/yyyy")); item.Attributes.Add("InformacoesAdicionais", titular.InformacoesAdicionais); cboTitular.Items.Add(item); item.DataBind(); } } }
public void FillComboboxFields(Telerik.Web.UI.RadComboBox RCBTableField, string argTableName) { RCBTableField.Items.Clear(); foreach (DataColumn dc in GetDBTableFields(argTableName).Tables[0].Columns) { string itemText = dc.ColumnName.ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dc.ColumnName.ToString() }; RCBTableField.Items.Add(itemCollection); itemCollection.DataBind(); } }
private void CarregueComboClasseViena(ILeituraRevistaDeMarcas processo) { cboClassificacaoViena.Items.Clear(); cboClassificacaoViena.Attributes.Clear(); foreach (var codigo in processo.ClasseViena.ListaDeCodigosClasseViena) { var item = new RadComboBoxItem(processo.ClasseViena.EdicaoClasseViena, processo.ClasseViena.EdicaoClasseViena); item.Attributes.Add("Codigo", codigo ?? "Não informada"); this.cboClassificacaoViena.Items.Add(item); item.DataBind(); } }
protected void RadComboBoxTask_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { IQueryable <Task> tasks = (IQueryable <Task>)_db.Tasks.Where(p => p.projectId == projectID); RadComboBox comboBox = (RadComboBox)sender; comboBox.Items.Clear(); foreach (Task t in tasks) { RadComboBoxItem item = new RadComboBoxItem(); item.Text = t.name; item.Value = t.taskId.ToString(); comboBox.Items.Add(item); item.DataBind(); } }
protected void RadComboBoxProject_ItemsRequested(object sender, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e) { IQueryable <Project> projects = (IQueryable <Project>)_db.Projects; RadComboBox comboBox = (RadComboBox)sender; comboBox.Items.Clear(); foreach (Project p in projects) { RadComboBoxItem item = new RadComboBoxItem(); item.Text = p.name; item.Value = p.projectId.ToString(); comboBox.Items.Add(item); item.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBTableStructure) { RCBTableStructure.Items.Clear(); foreach (DataRow dr in GetDBTableStructure().Tables[0].Rows) { String itemText = dr["TableName"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["TableName"].ToString() }; itemCollection.Attributes.Add("TableName", dr["TableName"].ToString()); RCBTableStructure.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBSalesOrderDetailItemNo, string argClientCode, string argSODocCode) { RCBSalesOrderDetailItemNo.Items.Clear(); foreach (DataRow dr in GetSalesOrderDetailsItemNo(argSODocCode, argClientCode).Tables[0].Rows) { String itemText = dr["SOItemNo"].ToString().Trim(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["SOItemNo"].ToString().Trim() }; itemCollection.Attributes.Add("SOItemNo", dr["SOItemNo"].ToString().Trim()); RCBSalesOrderDetailItemNo.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillModuleType(Telerik.Web.UI.RadComboBox RCBModuleType, string argClientCode) { RCBModuleType.Items.Clear(); foreach (DataRow dr in GetModuleType(argClientCode).Tables[0].Rows) { String itemText = dr["ModuleType"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["ModuleType"].ToString().Trim() }; itemCollection.Attributes.Add("ModuleType", dr["ModuleType"].ToString()); RCBModuleType.Items.Add(itemCollection); itemCollection.DataBind(); } }
protected void OnItemDataBoundHandler(object sender, GridItemEventArgs e) { if (e.Item.IsInEditMode) { GridEditableItem item = (GridEditableItem)e.Item; if (!(e.Item is IGridInsertItem)) { RadComboBox combo = (RadComboBox)item.FindControl("RadComboBox1"); RadComboBoxItem selectedItem = new RadComboBoxItem(); selectedItem.Text = ((DataRowView)e.Item.DataItem)["CompanyName"].ToString(); selectedItem.Value = ((DataRowView)e.Item.DataItem)["SupplierID"].ToString(); selectedItem.Attributes.Add("ContactName", ((DataRowView)e.Item.DataItem)["ContactName"].ToString()); combo.Items.Add(selectedItem); selectedItem.DataBind(); Session["SupplierID"] = selectedItem.Value; } } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBFiledName, int iIsDeleted) { RCBFiledName.Items.Clear(); foreach (DataRow dr in GetFieldMaster(iIsDeleted).Tables[0].Rows) { String itemText = dr["FieldName"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["FieldName"].ToString() }; itemCollection.Attributes.Add("FieldName", dr["FieldName"].ToString()); RCBFiledName.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCbCRLimitCheck, string argClientCode, int iIsDeleted) { RCbCRLimitCheck.Items.Clear(); foreach (DataRow dr in GetCRLimitCheck(iIsDeleted, argClientCode).Tables[0].Rows) { String itemText = dr["CRLimitCheckType"].ToString().Trim() + " " + dr["CRLimitCheckDesc"].ToString().Trim(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["CRLimitCheckType"].ToString().Trim() }; itemCollection.Attributes.Add("CRLimitCheckType", dr["CRLimitCheckType"].ToString().Trim()); itemCollection.Attributes.Add("CRLimitCheckDesc", dr["CRLimitCheckDesc"].ToString().Trim()); RCbCRLimitCheck.Items.Add(itemCollection); itemCollection.DataBind(); } }
protected void cboNCL_OnItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { var ncls = NCL.ObtenhaPorCodigoComoFiltro(e.Text); if (ncls.Count > 0) { foreach (var ncl in ncls) { var item = new RadComboBoxItem(ncl.Codigo, ncl.Codigo); item.Attributes.Add("Descricao", ncl.Descricao); item.Attributes.Add("Natureza", ncl.NaturezaDeMarca.Nome); cboNCL.Items.Add(item); item.DataBind(); } } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBIndustryMaster, string argClientCode, int iIsDeleted) { RCBIndustryMaster.Items.Clear(); foreach (DataRow dr in GetIndustryMaster(iIsDeleted, argClientCode).Tables[0].Rows) { String itemText = dr["IndustryName"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["IndustryName"].ToString().Trim() }; itemCollection.Attributes.Add("IndustryName", dr["IndustryName"].ToString()); RCBIndustryMaster.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(RadComboBox RCBPartnerStore, string argClientCode, int iIsDeleted) { RCBPartnerStore.Items.Clear(); foreach (DataRow dr in GetPartnerStorageLocation(iIsDeleted, argClientCode).Tables[0].Rows) { String itemText = dr["StoreCode"].ToString() + " " + dr["StoreName"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["StoreCode"].ToString().Trim() }; itemCollection.Attributes.Add("StoreCode", dr["StoreCode"].ToString()); itemCollection.Attributes.Add("StoreName", dr["StoreName"].ToString()); RCBPartnerStore.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBItemType, int iIsDeleted) { RCBItemType.Items.Clear(); foreach (DataRow dr in GetItemType().Tables[0].Rows) { String itemText = dr["ItemTypeCode"].ToString().Trim() + " " + dr["ItemTypeDesc"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["ItemTypeCode"].ToString().Trim() }; itemCollection.Attributes.Add("ItemTypeCode", dr["ItemTypeCode"].ToString().Trim()); itemCollection.Attributes.Add("ItemTypeDesc", dr["ItemTypeDesc"].ToString().Trim()); RCBItemType.Items.Add(itemCollection); itemCollection.DataBind(); } }
private void CarregueComboClasseNacional(ILeituraRevistaDeMarcas processo) { cboClassificacaoNacional.Items.Clear(); cboClassificacaoNacional.Attributes.Clear(); foreach (var codigo in processo.ClasseNacional.listaDeCodigosDeSubClasse) { var item = new RadComboBoxItem(processo.ClasseNacional.CodigoClasseNacional, processo.ClasseNacional.CodigoClasseNacional); item.Attributes.Add("Especificacao", processo.ClasseNacional.EspecificacaoClasseNacional ?? "Não informada"); item.Attributes.Add("SubClasse", codigo ?? "Não informada"); this.cboClassificacaoNacional.Items.Add(item); item.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBVendorGroup, string argClientCode, int iIsDeleted) { RCBVendorGroup.Items.Clear(); foreach (DataRow dr in GetVendorGroup(iIsDeleted, argClientCode).Tables[0].Rows) { String itemText = dr["VendGroupCode"].ToString() + " " + dr["VendGroupDesc"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["VendGroupCode"].ToString() }; itemCollection.Attributes.Add("VendGroupCode", dr["VendGroupCode"].ToString()); itemCollection.Attributes.Add("VendGroupDesc", dr["VendGroupDesc"].ToString()); RCBVendorGroup.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(RadComboBox RCBCondition, string argClientCode, int iIsDeleted) { RCBCondition.Items.Clear(); foreach (DataRow dr in GetConditionMaster(iIsDeleted, argClientCode).Tables[0].Rows) { String itemText = dr["ConditionCode"].ToString() + " " + dr["ConditionName"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["ConditionCode"].ToString().Trim() }; itemCollection.Attributes.Add("ConditionCode", dr["ConditionCode"].ToString()); itemCollection.Attributes.Add("ConditionName", dr["ConditionName"].ToString()); RCBCondition.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBOrderReason, string argClientCode) { RCBOrderReason.Items.Clear(); foreach (DataRow dr in GetOrderReason(argClientCode).Tables[0].Rows) { String itemText = dr["ReasonCode"].ToString() + " " + dr["ReasonDesc"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["ReasonCode"].ToString().Trim() }; itemCollection.Attributes.Add("ReasonCode", dr["ReasonCode"].ToString()); itemCollection.Attributes.Add("ReasonDesc", dr["ReasonDesc"].ToString()); RCBOrderReason.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(RadComboBox RCBPartnerMaster, string argPartnerCode, string argClientCode, int iIsDeleted) { RCBPartnerMaster.Items.Clear(); foreach (DataRow dr in GetPartnerEmployee4Combo(argPartnerCode, argClientCode, iIsDeleted).Tables[0].Rows) { String itemText = dr["PartnerEmployeeCode"].ToString() + " " + dr["EmployeeName"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["PartnerEmployeeCode"].ToString().Trim() }; itemCollection.Attributes.Add("PartnerEmployeeCode", dr["PartnerEmployeeCode"].ToString()); itemCollection.Attributes.Add("EmployeeName", dr["EmployeeName"].ToString()); RCBPartnerMaster.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBGLAccountGroup, string argChartACCode, string argClientCode, int iIsDeleted) { RCBGLAccountGroup.Items.Clear(); foreach (DataRow dr in GetGLAccountGroups(argChartACCode, iIsDeleted, argClientCode).Tables[0].Rows) { String itemText = dr["ActGroup"].ToString() + " " + dr["GroupName"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["ActGroup"].ToString() }; itemCollection.Attributes.Add("ActGroup", dr["ActGroup"].ToString()); itemCollection.Attributes.Add("GroupName", dr["GroupName"].ToString()); RCBGLAccountGroup.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBDivision, string argClientCode, string argSalesOrganizationCode) { RCBDivision.Items.Clear(); foreach (DataRow dr in GetDivision4SalesOrg(argSalesOrganizationCode, argClientCode).Tables[0].Rows) { String itemText = dr["DivisionCode"].ToString().Trim() + " " + dr["DivisionName"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["DivisionCode"].ToString().Trim() }; itemCollection.Attributes.Add("DivisionCode", dr["DivisionCode"].ToString().Trim()); itemCollection.Attributes.Add("DivisionName", dr["DivisionName"].ToString()); RCBDivision.Items.Add(itemCollection); itemCollection.DataBind(); } }
protected void ddl_Roles_ItemsRequested(object sender, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e) { BallyliffinDataContext db = new BallyliffinDataContext(); List<sp_MembersByRole_ShortViewResult> roles = db.sp_MembersByRole_ShortView().ToList(); foreach (sp_MembersByRole_ShortViewResult role in roles) { RadComboBoxItem item = new RadComboBoxItem(); item.Text = (string)role.RoleDesc; item.Value = role.RoleID.ToString(); item.Attributes.Add("RoleDesc", role.RoleDesc); item.Attributes.Add("Total", role.Total.Value.ToString()); ddl_Roles.Items.Add(item); item.DataBind(); } }
protected void cboProcedimentosInternos_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { IList<ITipoDeProcedimentoInterno> listaProcedimentosInternos = new List<ITipoDeProcedimentoInterno>(); using (var servico = FabricaGenerica.GetInstancia().CrieObjeto<IServicoDeTipoDeProcedimentoInterno>()) { listaProcedimentosInternos = servico.obtenhaTipoProcedimentoInternoPelaDescricao(e.Text); } if (listaProcedimentosInternos.Count > 0) { foreach (var procedimentoInterno in listaProcedimentosInternos) { var item = new RadComboBoxItem(procedimentoInterno.Descricao, procedimentoInterno.Id.Value.ToString()); item.Attributes.Add("ID", procedimentoInterno.Id.ToString()); cboTipoDeProcedimentosInternos.Items.Add(item); item.DataBind(); } } }
private void CarregueComboTipoDeClassificacao() { var itemInternacional = new RadComboBoxItem(TipoClassificacaoPatente.Internacional.Descricao, TipoClassificacaoPatente.Internacional.Codigo.ToString()); var itemNacional = new RadComboBoxItem(TipoClassificacaoPatente.Nacional.Descricao, TipoClassificacaoPatente.Nacional.Codigo.ToString()); if (cboTipoDeClassificacao.Items.Count == 0) { cboTipoDeClassificacao.Items.Add(itemInternacional); cboTipoDeClassificacao.Items.Add(itemNacional); itemInternacional.DataBind(); itemNacional.DataBind(); } }
private void CarregueCombo(IList<Situacao> situacoesADesconsiderar) { if (situacoesADesconsiderar == null) situacoesADesconsiderar = new List<Situacao>(); foreach (var situacao in Situacao.ObtenhaTodos()) { if (!situacoesADesconsiderar.Contains(situacao)) { var item = new RadComboBoxItem(situacao.Descricao, situacao.ID.ToString()); cboSituacao.Items.Add(item); item.DataBind(); } } }
protected void cboDespachoDeMarcas_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { IList<IDespachoDeMarcas> listaDespachoDeMarcas = new List<IDespachoDeMarcas>(); using (var servico = FabricaGenerica.GetInstancia().CrieObjeto<IServicoDeDespachoDeMarcas>()) listaDespachoDeMarcas = servico.ObtenhaPorDescricao(e.Text, 50); if (listaDespachoDeMarcas.Count > 0) { foreach (var despachoDeMarcas in listaDespachoDeMarcas) { var item = new RadComboBoxItem(despachoDeMarcas.CodigoDespacho, despachoDeMarcas.IdDespacho.Value.ToString()); item.Attributes.Add("Descricao",despachoDeMarcas.DescricaoDespacho); cboDespachoDeMarcas.Items.Add(item); item.DataBind(); } } }
private void cargarProducto(string dispenserID) { try { Connection conexion = new Connection(); cmbProducto.EmptyMessage = "Seleccione un producto"; cmbProducto.Items.Clear(); string userCountry = conexion.getUserCountry(Session["userid"].ToString()); string query = String.Format("SELECT PRODUCT_ID, PRODUCT_DESCRIP FROM PRODUCTOS WHERE DISPENSER_ID = '{0}' AND COUNTRY_ID = '{1}'", dispenserID, userCountry); try { SqlConnection bridge = new SqlConnection(conexion.getConnectionString()); SqlDataAdapter adapter = new SqlDataAdapter(query, bridge); DataTable datatable = new DataTable(); adapter.Fill(datatable); foreach (DataRow datarow in datatable.Rows) { RadComboBoxItem item = new RadComboBoxItem(); item.Text = datarow["PRODUCT_ID"].ToString() + " " + datarow["PRODUCT_DESCRIP"].ToString(); item.Value = datarow["PRODUCT_ID"].ToString(); cmbProducto.Items.Add(item); item.DataBind(); } } catch (SqlException) { radajaxmanager.ResponseScripts.Add(@"alert('Error inesperado de conexion, no se logro cargar la lista de productos refresque la pagina" + " o intentelo mas tarde.');"); return; } } catch (Exception error) { radajaxmanager.ResponseScripts.Add(String.Format("errorEnvio('{0}');", error.Message)); } }
protected void cboPasta_OnItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { IList<IPasta> pastas = new List<IPasta>(); using (var servico = FabricaGenerica.GetInstancia().CrieObjeto<IServicoDePasta>()) pastas = servico.obtenhaPeloCodigo(e.Text, 50); if (pastas.Count > 0) foreach (var pasta in pastas) { var item = new RadComboBoxItem(pasta.Codigo, pasta.ID.Value.ToString()); item.Attributes.Add("Nome", pasta.Nome); cboPasta.Items.Add(item); item.DataBind(); } }
protected void cboMarca_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { IList<IMarcas> listaDeMarcas = new List<IMarcas>(); using (var servico = FabricaGenerica.GetInstancia().CrieObjeto<IServicoDeMarcas>()) listaDeMarcas = servico.obtenhaMarcasPelaDescricaoComoFiltro(e.Text, 50); if (listaDeMarcas.Count > 0) { foreach (var marca in listaDeMarcas) { var item = new RadComboBoxItem(marca.DescricaoDaMarca, marca.IdMarca.Value.ToString()); item.Attributes.Add("Apresentacao", marca.Apresentacao.Nome ?? "Não informada"); item.Attributes.Add("Natureza", marca.Natureza.Nome ?? "Não informada"); item.Attributes.Add("NCL", marca.NCL.Codigo.ToString() ?? "Não informada"); this.cboMarcas.Items.Add(item); item.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { try { Menu menu = Master.FindControl("NavigationMenu") as Menu; menu.Items[2].ChildItems[1].ChildItems.RemoveAt(1); if (!IsPostBack) { if (Session.Contents["rol"].ToString().Equals("DSTADM")) Response.Redirect("../Default.aspx"); Connection conexion = new Connection(); string query = String.Format("SELECT K.KAM_ID, K.KAM_NAME FROM KAM AS K WHERE K.COUNTRY = '{0}' AND 0 = (SELECT COUNT(U.USER_ID) FROM USUARIOS AS U WHERE U.USER_ID = K.KAM_ID AND U.STATUS = 1)" , conexion.getUserCountry(Session.Contents["userid"].ToString())); DataTable resultset = conexion.getGridDataSource(query); foreach (DataRow fila in resultset.Rows) { RadComboBoxItem item = new RadComboBoxItem(); item.Text = fila["KAM_NAME"].ToString(); item.Value = fila["KAM_ID"].ToString(); item.DataBind(); cmbKAM.Items.Add(item); } cargarCuentasDisponibles(conexion); } } catch (Exception error) { RadAjaxManager1.ResponseScripts.Add(String.Format("errorEnvio('{0}');", error.Message)); } }
protected void RadComboBoxFirma_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e) { EFDal ed = new EFDal(); if (e.Text.Length > 2) { string BolgeKodu = ed.kal_BolgeKoduDon(Context.User.Identity.Name).ToString(); string sqlSelectCommand = ""; sqlSelectCommand = "SELECT [FIRMAID],[MUSTNO], [FIRMAADI], [IL_ILCE] from [firma] WHERE [FIRMAADI] LIKE '%'+ @text + '%' and SILINDI=0 and BOLGEKODU=" + BolgeKodu + " ORDER BY [FIRMAADI]"; SqlDataAdapter adapter = new SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings["KalData"].ConnectionString); adapter.SelectCommand.Parameters.AddWithValue("@text", e.Text); DataTable dataTable = new DataTable(); adapter.Fill(dataTable); RadComboBoxFirma.Items.Clear(); foreach (DataRow dataRow in dataTable.Rows) { string IlIlce = ""; RadComboBoxItem item = new RadComboBoxItem(); item.Text = (string)dataRow["MUSTNO"].ToString(); item.Value = dataRow["FIRMAID"].ToString(); string FirmaAdi = (string)dataRow["FIRMAADI"]; if (dataRow["IL_ILCE"] != System.DBNull.Value) { IlIlce = (string)dataRow["IL_ILCE"]; } item.Attributes.Add("FIRMAADI", FirmaAdi); item.Attributes.Add("IL_ILCE", IlIlce); RadComboBoxFirma.Items.Add(item); item.DataBind(); } Label lbl = (Label)RadComboBoxFirma.Footer.FindControl("lblBulunanKayitSayisi"); lbl.Text = "Bulunan kayıt sayısı:" + " " + dataTable.Rows.Count.ToString(); } }
protected void Page_Load(object sender, EventArgs e) { try { Menu menu = Master.FindControl("NavigationMenu") as Menu; menu.Items[2].ChildItems[0].ChildItems.RemoveAt(0); if (!IsPostBack) { Connection conexion = new Connection(); if (Session.Contents["rol"].ToString().Equals("DSTADM")) Response.Redirect("../Default.aspx"); string query = String.Format("SELECT CLIENT_ID, CLIENT_NAME FROM CLIENTES_KC WHERE COUNTRY = '{0}' AND DIRECT_CUSTOMER = 0", conexion.getUserCountry(Session.Contents["userid"].ToString())); DataTable clientes = conexion.getGridDataSource(query); RadComboBoxItem temp = new RadComboBoxItem(); temp.Value = "0"; temp.Text = "Kimberly-Clark"; temp.DataBind(); cmbUbicacion.Items.Add(temp); foreach (DataRow fila in clientes.Rows) { RadComboBoxItem item = new RadComboBoxItem(); item.Text = fila["CLIENT_ID"].ToString() + " | " + fila["CLIENT_NAME"].ToString(); item.Value = fila["CLIENT_ID"].ToString(); item.DataBind(); cmbUbicacion.Items.Add(item); } cargarRoles(); } } catch (Exception error) { RadAjaxManager1.ResponseScripts.Add(String.Format("errorEnvio('{0}');", error.Message)); } }
private void CarregueComboSobrestadores(ILeituraRevistaDeMarcas processo) { cboSobrestador.Items.Clear(); cboSobrestador.Attributes.Clear(); foreach (var processoSobrestador in processo.DicionarioSobrestadores.Keys) { var item = new RadComboBoxItem(processoSobrestador, processoSobrestador); item.Attributes.Add("Marca", processo.DicionarioSobrestadores[processoSobrestador] ?? "Não informada"); this.cboSobrestador.Items.Add(item); item.DataBind(); } }
private void CarregueCombo(IList<TipoLacamentoFinanceiroRecebimento> tiposADesconsiderar) { if (tiposADesconsiderar == null) tiposADesconsiderar = new List<TipoLacamentoFinanceiroRecebimento>(); foreach (var tipo in TipoLacamentoFinanceiroRecebimento.ObtenhaTodos()) { if (!tiposADesconsiderar.Contains(tipo)) { var item = new RadComboBoxItem(tipo.Descricao, tipo.ID.ToString()); cboTipoLacamento.Items.Add(item); item.DataBind(); } } }
protected void cboPatente_OnItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { using (var servico = FabricaGenerica.GetInstancia().CrieObjeto<IServicoDePatente>()) { cboPatente.Items.Clear(); IList<IPatente> patentes = IdClienteSelecionado != 0 ? servico.ObtenhaPatentesDoCliente(e.Text, IdClienteSelecionado, 50) : servico.ObtenhaPatentesPeloTitulo(e.Text, 50); foreach (IPatente patente in patentes) { var item = new RadComboBoxItem(patente.TituloPatente, patente.Identificador.ToString()); item.Attributes.Add("TipoDePatente", patente.NaturezaPatente.SiglaNatureza); item.Attributes.Add("DataDeCadastro", patente.DataCadastro != null ? patente.DataCadastro.Value.ToString("dd/MM/yyyy") : "Data não informada"); cboPatente.Items.Add(item); item.DataBind(); } } }
private void CarregueCombo() { foreach (var forma in FormaDeRecebimento.ObtenhaTodos()) { var item = new RadComboBoxItem(forma.Descricao, forma.ID.ToString()); cboFormaDeRecebimento.Items.Add(item); item.DataBind(); } }
protected void RadComboBoxFirma_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e) { //string BolgeKodu = Session["BolgeKodu"].ToString(); //string bak = e.Text; if (e.Text.Length > 2) { string BolgeKodu = intBolgeKodu.ToString(); string sqlSelectCommand = ""; /* if (rdbtnlstAramaTipi.SelectedIndex == 0)//isnodan arama sqlSelectCommand = "SELECT [ObjectID], [isno], [adi], [birim] from [tblIsEmri] WHERE [isno] LIKE '%'+ @text + '%' ORDER BY [isno]"; if (rdbtnlstAramaTipi.SelectedIndex == 1)//is adından arama sqlSelectCommand = "SELECT [ObjectID], [isno], [adi], [birim] from [tblIsEmri] WHERE [adi] LIKE '%'+ @text + '%' ORDER BY [adi]"; if (rdbtnlstAramaTipi.SelectedIndex == 2)//Birimden arama sqlSelectCommand = "SELECT [ObjectID], [isno], [adi], [birim] from [tblIsEmri] WHERE [birim] LIKE '%'+ @text + '%' ORDER BY [birim]"; */ sqlSelectCommand = "SELECT [FIRMAID],[MUSTNO], [FIRMAADI], [IL_ILCE] from [firma] WHERE [FIRMAADI] LIKE '%'+ @text + '%' and SILINDI=0 and BOLGEKODU=" + BolgeKodu + " ORDER BY [FIRMAADI]"; SqlDataAdapter adapter = new SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings["KalData"].ConnectionString); adapter.SelectCommand.Parameters.AddWithValue("@text", e.Text); DataTable dataTable = new DataTable(); adapter.Fill(dataTable); //lblBulunanIsSayisi.Text = dataTable.Rows.Count.ToString(); RadComboBoxFirma.Items.Clear(); foreach (DataRow dataRow in dataTable.Rows) { string IlIlce = ""; RadComboBoxItem item = new RadComboBoxItem(); item.Text = (string)dataRow["MUSTNO"].ToString(); item.Value = dataRow["FIRMAID"].ToString(); string FirmaAdi = (string)dataRow["FIRMAADI"]; if (dataRow["IL_ILCE"] != System.DBNull.Value) { IlIlce = (string)dataRow["IL_ILCE"]; } item.Attributes.Add("FIRMAADI", FirmaAdi); item.Attributes.Add("IL_ILCE", IlIlce); RadComboBoxFirma.Items.Add(item); item.DataBind(); } Label lbl = (Label)RadComboBoxFirma.Footer.FindControl("lblBulunanKayitSayisi"); lbl.Text = "Bulunan kayıt sayısı:" + " " + dataTable.Rows.Count.ToString(); } }
protected void cboNaturezaPatente_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { IList<INaturezaPatente> listaNaturezaPatente = new List<INaturezaPatente>(); using (var servico = FabricaGenerica.GetInstancia().CrieObjeto<IServicoDeNaturezaPatente>()) listaNaturezaPatente = servico.obtenhaNaturezaPatentePelaSiglaComoFiltro(e.Text, 50); if (listaNaturezaPatente.Count > 0) { foreach (var naturezaPatente in listaNaturezaPatente) { var item = new RadComboBoxItem(naturezaPatente.SiglaNatureza, naturezaPatente.IdNaturezaPatente.Value.ToString()); item.Attributes.Add("Descricao", naturezaPatente.DescricaoNaturezaPatente ?? "Não informada"); cboNaturezaPatente.Items.Add(item); item.DataBind(); } } }