private void BindDropdown()
        {
            string  XmlFile          = GblIQCare.GetXMLPath() + "Currency.xml";
            DataSet theDSCurrencyXML = new DataSet();

            theDSCurrencyXML.ReadXml(XmlFile);

            string CurrencyCode = theDSCurrencyXML.Tables[0].Select("Id = '" + GblIQCare.AppCountryId + "'").SingleOrDefault().ItemArray[1].ToString().Split('(').LastOrDefault().Replace(")", "");

            lblCurrency.Text = "Currency: " + CurrencyCode;

            BindFunctions objBindControls = new BindFunctions();
            DataTable     theDT           = new DataTable();

            theDT = objBindControls.GetYears(DateTime.Now.AddYears(1).Year, "Name", "Id");
            ddlProgramYear.Items.Clear();
            objBindControls.Win_BindCombo(ddlProgramYear, theDT, "Name", "Id");

            ddlDonorPayer.DataSource = null;
            ddlDonorPayer.Items.Clear();
            objBindControls.Win_BindCombo(ddlDonorPayer, dsDonorList.Tables[0], "DonorName", "Id");

            ddlProgram.DataSource = null;
            ddlProgram.Items.Clear();
            objBindControls.Win_BindCombo(ddlProgram, dsProgramList.Tables[0], "ProgramName", "Id");
        }
Esempio n. 2
0
        private void BindDropdown()
        {
            BindFunctions objBindControls = new BindFunctions();
            DataTable     dtYears         = objBindControls.GetYears(DateTime.Now.Year, "Name", "Id");

            ddlProgramYear.Items.Clear();
            objBindControls.Win_BindCombo(ddlProgramYear, dtYears, "Name", "Id");
            ddlProgramYear.SelectedValue = DateTime.Now.Year;
        }