public List <MDMSVC.DC_Supplier_DDL> GetSupplierByEntity(MDMSVC.DC_Supplier_Search_RQ RQParams) { object result = null; ServiceConnection.MDMSvcProxy.PostData(ConfigurationManager.AppSettings["SupplierByEntity_Get"], RQParams, typeof(MDMSVC.DC_Supplier_Search_RQ), typeof(List <MDMSVC.DC_Supplier_DDL>), out result); return(result as List <DC_Supplier_DDL>); }
private void BindDropdown() { try { MDMSVC.DC_Supplier_Search_RQ RQParam = new MDMSVC.DC_Supplier_Search_RQ(); RQParam.SupplierType = "File Static Data"; RQParam.PageNo = 0; RQParam.PageSize = int.MaxValue; var resultSet = _objMasterSVC.GetSupplier(RQParam); RQParam.SupplierType = "File & API Static Data"; var resultSet2 = _objMasterSVC.GetSupplier(RQParam); resultSet.AddRange(resultSet2); resultSet = resultSet.OrderBy(o => o.Name).ToList(); ddlSupplierList.DataSource = resultSet; ddlSupplierList.DataValueField = "Supplier_Id"; ddlSupplierList.DataTextField = "Name"; ddlSupplierList.DataBind(); ddlSupplierList.Items.RemoveAt(0); ddlSupplierList.Items.Insert(0, new ListItem("--Select --", "0")); fillattributes("MappingFileConfig", "MappingEntity", ddlEntityList); } catch (Exception ex) { } }
private void fillSupplierList(DropDownList ddl) { MDMSVC.DC_Supplier_Search_RQ RQ = new MDMSVC.DC_Supplier_Search_RQ(); RQ.EntityType = "Accommodation"; RQ.StatusCode = "ACTIVE"; ddl.DataSource = _objMasterSVC.GetSupplierByEntity(RQ); ddl.DataValueField = "Supplier_Id"; ddl.DataTextField = "Name"; ddl.DataBind(); }
protected void fillSuppliers() { MDMSVC.DC_Supplier_Search_RQ RQParam = new MDMSVC.DC_Supplier_Search_RQ(); RQParam.SupplierType = "API Static Data"; RQParam.PageNo = 0; RQParam.PageSize = int.MaxValue; ddlSupplierName.DataSource = _objMasterSVC.GetSupplier(RQParam); ddlSupplierName.DataValueField = "Supplier_Id"; ddlSupplierName.DataTextField = "Name"; ddlSupplierName.DataBind(); }
private void fillSupplierListToListBox(ListBox ddl) { MDMSVC.DC_Supplier_Search_RQ RQ = new MDMSVC.DC_Supplier_Search_RQ(); List <MDMSVC.DC_Supplier_DDL> listSupplier = new List <MDMSVC.DC_Supplier_DDL>(); RQ.EntityType = "Accommodation"; RQ.StatusCode = "ACTIVE"; listSupplier = _objMasterSVC.GetSupplierByEntity(RQ); var itemToRemove = listSupplier.Single(r => r.Supplier_Id == new Guid(ddlSupplierName.SelectedValue)); listSupplier.Remove(itemToRemove); //ddl.DataSource = _objMasterSVC.GetSupplierByEntity(RQ); ddl.Items.Clear(); ddl.DataSource = listSupplier; ddl.DataValueField = "Supplier_Id"; ddl.DataTextField = "Name"; ddl.DataBind(); }
protected void fillSupplierAddClick() { MDMSVC.DC_Supplier_Search_RQ RQParam = new MDMSVC.DC_Supplier_Search_RQ(); RQParam.SupplierType = "API Static Data"; RQParam.PageNo = 0; RQParam.PageSize = int.MaxValue; var resultSet = _objMasterSVC.GetSupplier(RQParam); RQParam.SupplierType = "File & API Static Data"; var resultSet2 = _objMasterSVC.GetSupplier(RQParam); resultSet.AddRange(resultSet2); resultSet = resultSet.OrderBy(o => o.Name).ToList(); ddlSupplierList.DataSource = resultSet; ddlSupplierList.DataValueField = "Supplier_Id"; ddlSupplierList.DataTextField = "Name"; ddlSupplierList.DataBind(); ddlSupplierList.Items.RemoveAt(0); ddlSupplierList.Items.Insert(0, new ListItem("--Select --", "0")); }
protected void bindSupplierSearchGrid(int intPageSize, int intPageIndex) { //Find Serarch Filter string SupplierCode = txtSupplierCode.Text.Trim(); string SupplierName = txtSupplierName.Text.Trim(); string SupplierType = Convert.ToString(ddlSupplierType.SelectedItem.Text); string ProductCategory = Convert.ToString(ddlProductCategory.SelectedValue); string ProductSubCategoryType = Convert.ToString(ddlProductCategorySubType.SelectedValue); string ddlStatusValue = Convert.ToString(ddlStatus.SelectedValue); MDMSVC.DC_Supplier_Search_RQ _objSearch = new MDMSVC.DC_Supplier_Search_RQ(); _objSearch.PageSize = intPageSize; _objSearch.PageNo = intPageIndex; if (!string.IsNullOrWhiteSpace(SupplierCode)) { _objSearch.Code = SupplierCode; } if (!string.IsNullOrWhiteSpace(SupplierName)) { _objSearch.Name = SupplierName; } if (SupplierType != "--ALL--") { _objSearch.SupplierType = SupplierType; } if (ProductCategory != "0") { _objSearch.ProductCategory_ID = ProductCategory; } if (ProductSubCategoryType != "0") { _objSearch.CategorySubType_ID = ProductSubCategoryType; } if (ddlStatusValue != "0") { _objSearch.StatusCode = ddlStatusValue; } divDropdownForEntries.Visible = true; var result = _objMaster.GetSupplier(_objSearch); if (result != null) { if (result.Count > 0) { grdSupplierList.VirtualItemCount = result[0].TotalRecords; lblTotalRecords.Text = result[0].TotalRecords.ToString(); } else { grdSupplierList.DataSource = null; grdSupplierList.DataBind(); lblTotalRecords.Text = String.Empty; divDropdownForEntries.Visible = false; } grdSupplierList.DataSource = result; grdSupplierList.PageIndex = intPageIndex; grdSupplierList.PageSize = intPageSize; grdSupplierList.DataBind(); } else { grdSupplierList.DataSource = null; grdSupplierList.DataBind(); lblTotalRecords.Text = String.Empty; } }