private void BindCurrency() { try { DataSet ds = _objBoutility.GetCurrency(); if (ds.Tables[0].Rows.Count > 0) { DDLCurrency.DataSource = ds.Tables[0]; DDLCurrency.DataTextField = "code"; DDLCurrency.DataValueField = "id"; DDLCurrency.DataBind(); DDLCurrency.Items.Insert(0, new ListItem("-- Please Select --", "0")); } else { DDLCurrency.DataSource = null; DDLCurrency.DataBind(); DDLCurrency.Items.Insert(0, new ListItem("-- Please Select --", "0")); } } catch (Exception ex) { lblMsg.Text = _objBoutility.ShowMessage("danger", "error", ex.Message); ExceptionLogging.SendExcepToDB(ex); } }
protected void Page_Load(object sender, EventArgs e) { UserAccessValidation(); if (!IsPostBack) { // first check for supplier's log-in if (!string.IsNullOrWhiteSpace(Convert.ToString(Session["SUPPCODE"]))) { btnReworkToSupplier.Visible = false; btnRecallContract.Visible = false; } BLL_Infra_Currency objCurr = new BLL_Infra_Currency(); DDLCurrency.DataTextField = "Currency_Code"; DDLCurrency.DataValueField = "Currency_ID"; DDLCurrency.DataSource = objCurr.Get_CurrencyList(); DDLCurrency.DataBind(); ListItem lis = new ListItem("Select", "0"); DDLCurrency.Items.Insert(0, lis); DDLCurrency.SelectedIndex = 0; BindContractInfo(); BindDataItems(); BindFieldsAfterSave(); } }
protected void FillDDLs() { BLL_Infra_Currency objCurr = new BLL_Infra_Currency(); DDLCurrency.DataTextField = "Currency_Code"; DDLCurrency.DataValueField = "Currency_ID"; DDLCurrency.DataSource = objCurr.Get_CurrencyList(); DDLCurrency.DataBind(); ListItem lis = new ListItem("Select", "0"); DDLCurrency.Items.Insert(0, lis); DDLCurrency.SelectedIndex = 0; ddlHub.DataTextField = "Description"; ddlHub.DataValueField = "code"; ddlHub.DataSource = BLL_PURC_LOG.Get_Log_Hub_List(); ddlHub.DataBind(); ListItem lisHub = new ListItem("Select", "0"); ddlHub.Items.Insert(0, lisHub); ddlHub.SelectedIndex = 0; BLL_PURC_Purchase objport = new BLL_PURC_Purchase(); DataTable dt = objport.SelectSupplier(); dt.DefaultView.RowFilter = " SUPPLIER_CATEGORY in ('A','S') and ASL_Status in ('Approve','Conditional') "; ddlAgentFord.DataTextField = "SUPPLIER_NAME"; ddlAgentFord.DataValueField = "SUPPLIER"; ddlAgentFord.DataSource = dt.DefaultView.ToTable(); ddlAgentFord.DataBind(); ddlAgentFord.Items.Insert(0, new ListItem("SELECT", "0")); ddlAgentFord.SelectedIndex = 0; //BLL_Infra_Port objBLLPort = new BLL_Infra_Port(); //ctlPortList1.DataTextField = "Port_Name"; //ctlPortList1.DataValueField = "Port_ID"; //ctlPortList1.DataSource = objBLLPort.Get_PortList_Mini(); //ctlPortList1.DataBind(); //ctlPortList1.Items.Insert(0, new ListItem("SELECT", "0")); //ctlPortList1.SelectedIndex = 0; }