private void LoadLookups()
    {
        GOVERNORATE gov = new GOVERNORATE();
        gov.LoadAll();

        uiDropDownListGov.DataSource = gov.DefaultView;
        uiDropDownListGov.DataTextField = GOVERNORATE.ColumnNames.DESCR;
        uiDropDownListGov.DataValueField = GOVERNORATE.ColumnNames.CD;
        uiDropDownListGov.DataBind();
        uiDropDownListGov.Items.Insert(0, new ListItem("---"));
        uiDropDownListGov.SelectedIndex = 0;

        uiDropDownListMachineGov.DataSource = gov.DefaultView;
        uiDropDownListMachineGov.DataTextField = GOVERNORATE.ColumnNames.DESCR;
        uiDropDownListMachineGov.DataValueField = GOVERNORATE.ColumnNames.CD;
        uiDropDownListMachineGov.DataBind();
        uiDropDownListMachineGov.Items.Insert(0, new ListItem("---"));
        uiDropDownListMachineGov.SelectedIndex = 0;

        CIVIL_OFFICE pol = new CIVIL_OFFICE();
        pol.LoadAll();
        uiDropDownListCivil.DataSource = pol.DefaultView;
        uiDropDownListCivil.DataTextField = POLICE_STATION.ColumnNames.DESCR;
        uiDropDownListCivil.DataValueField = POLICE_STATION.ColumnNames.CD;
        uiDropDownListCivil.DataBind();
        uiDropDownListCivil.Items.Insert(0, new ListItem("---"));
        uiDropDownListCivil.SelectedIndex = 0;

        uiDropDownListMachineCivil.DataSource = pol.DefaultView;
        uiDropDownListMachineCivil.DataTextField = POLICE_STATION.ColumnNames.DESCR;
        uiDropDownListMachineCivil.DataValueField = POLICE_STATION.ColumnNames.CD;
        uiDropDownListMachineCivil.DataBind();
        uiDropDownListMachineCivil.Items.Insert(0, new ListItem("---"));
        uiDropDownListMachineCivil.SelectedIndex = 0;

        health_office obj = new health_office();
        obj.LoadAll();
        uiDropDownListHealthOffice.DataSource = obj.DefaultView;
        uiDropDownListHealthOffice.DataTextField = health_office.ColumnNames.HEALTHDESCR;
        uiDropDownListHealthOffice.DataValueField = health_office.ColumnNames.HEALTHCD;
        uiDropDownListHealthOffice.DataBind();
        uiDropDownListHealthOffice.Items.Insert(0, new ListItem("---"));
        uiDropDownListHealthOffice.SelectedIndex = 0;

        uiDropDownListMachineHealthOffice.DataSource = obj.DefaultView;
        uiDropDownListMachineHealthOffice.DataTextField = health_office.ColumnNames.HEALTHDESCR;
        uiDropDownListMachineHealthOffice.DataValueField = health_office.ColumnNames.HEALTHCD;
        uiDropDownListMachineHealthOffice.DataBind();
        uiDropDownListMachineHealthOffice.Items.Insert(0, new ListItem("---"));
        uiDropDownListMachineHealthOffice.SelectedIndex = 0;
    }
    private void LoadDDls()
    {
        GOVERNORATE gov = new GOVERNORATE();
        gov.LoadAll();

        uiDropDownListGov.DataSource = gov.DefaultView;
        uiDropDownListGov.DataTextField = GOVERNORATE.ColumnNames.DESCR;
        uiDropDownListGov.DataValueField = GOVERNORATE.ColumnNames.CD;
        uiDropDownListGov.DataBind();
        uiDropDownListGov.Items.Insert(0, new ListItem("---"));
        uiDropDownListGov.SelectedIndex = 0;

        uiDropDownListPriority.DataSource = SqlHelper.ExecuteDataset(MHOCommon.ConnString, "GetPrioritys");
        uiDropDownListPriority.DataTextField = "PriorityName";
        uiDropDownListPriority.DataValueField = "PriorityID";
        uiDropDownListPriority.DataBind();
        uiDropDownListPriority.Items.Insert(0, new ListItem("---"));
        uiDropDownListPriority.SelectedIndex = 0;

        uiDropDownListStatus.DataSource = SqlHelper.ExecuteDataset(MHOCommon.ConnString, "GetStatuses");
        uiDropDownListStatus.DataTextField = "StatusName";
        uiDropDownListStatus.DataValueField = "StatusID";
        uiDropDownListStatus.DataBind();
        uiDropDownListStatus.Items.Insert(0, new ListItem("---"));
        uiDropDownListStatus.SelectedIndex = 0;
    }
 private void LoadGoves()
 {
     GOVERNORATE gov = new GOVERNORATE();
     gov.LoadAll();
     drpGov.DataSource = gov.DefaultView;
     drpGov.DataTextField = GOVERNORATE.ColumnNames.DESCR;
     drpGov.DataValueField = GOVERNORATE.ColumnNames.CD;
     drpGov.DataSource = gov.DefaultView;
     drpGov.DataBind();
     drpGov.Items.Insert(0, new ListItem("اختر مديرية", "-1"));
     drpGov.SelectedIndex = 0;
 }
    /// <summary>
    /// load lookup data.
    /// </summary>
    private void LoadLookups()
    {
        GOVERNORATE objGov = new GOVERNORATE();
        objGov.LoadAll();

        drpState.DataSource = objGov.DefaultView;
        drpState.DataTextField = GOVERNORATE.ColumnNames.DESCR;
        drpState.DataValueField = GOVERNORATE.ColumnNames.CD;
        drpState.DataBind();

        ListItem item = new ListItem("-----", "0");
        drpState.Items.Insert(0, item);
        drpSubSection.Items.Insert(0, item);
        dropSection.Items.Insert(0, item);
        drpState.SelectedIndex = 0;

        Jobs jobs = new Jobs ();
        jobs.LoadAll();

        uiDropDownListJob.DataSource = jobs.DefaultView;
        uiDropDownListJob.DataTextField = Jobs.ColumnNames.Name;
        uiDropDownListJob.DataValueField = Jobs.ColumnNames.Id;
        uiDropDownListJob.Items.Insert(0, item);
        uiDropDownListJob.DataBind();
    }
    private void LoadLookups()
    {
        GOVERNORATE gov = new GOVERNORATE();
        gov.LoadAll();

        uiDropDownListGov.DataSource = gov.DefaultView;
        uiDropDownListGov.DataTextField = GOVERNORATE.ColumnNames.DESCR;
        uiDropDownListGov.DataValueField = GOVERNORATE.ColumnNames.CD;
        uiDropDownListGov.DataBind();
        uiDropDownListGov.Items.Insert(0, new ListItem("---", "0"));
        uiDropDownListGov.SelectedValue = MHOCommon.CurrentOrgGovID.ToString();

        if (uiDropDownListGov.SelectedIndex != 0)
        {
            CIVIL_OFFICE pol = new CIVIL_OFFICE();
            pol.Where.FK_GOVCD.Value = short.Parse(uiDropDownListGov.SelectedValue);
            pol.Where.FK_GOVCD.Operator = MyGeneration.dOOdads.WhereParameter.Operand.Equal;
            pol.Query.AddOrderBy(CIVIL_OFFICE.ColumnNames.DESCR, MyGeneration.dOOdads.WhereParameter.Dir.ASC);
            pol.Query.Load();
            uiDropDownListCivil.DataSource = pol.DefaultView;
            uiDropDownListCivil.DataTextField = POLICE_STATION.ColumnNames.DESCR;
            uiDropDownListCivil.DataValueField = POLICE_STATION.ColumnNames.CD;
            uiDropDownListCivil.DataBind();
            uiDropDownListCivil.Items.Insert(0, new ListItem("---", "0"));
            uiDropDownListCivil.SelectedIndex = 0;
        }

        uiDropDownListMachineGov.DataSource = gov.DefaultView;
        uiDropDownListMachineGov.DataTextField = GOVERNORATE.ColumnNames.DESCR;
        uiDropDownListMachineGov.DataValueField = GOVERNORATE.ColumnNames.CD;
        uiDropDownListMachineGov.DataBind();
        uiDropDownListMachineGov.Items.Insert(0, new ListItem("---", "0"));
        uiDropDownListMachineGov.SelectedIndex = 0;
    }
 private void LoadGoves()
 {
     GOVERNORATE gov = new GOVERNORATE();
     gov.LoadAll();
     drpGove.DataSource = gov.DefaultView;
     drpGove.DataTextField = GOVERNORATE.ColumnNames.DESCR;
     drpGove.DataValueField = GOVERNORATE.ColumnNames.CD;
     drpGove.DataBind();
     drpGove.SelectedIndex = 0;
 }
 /// <summary>
 /// load lookup data.
 /// </summary>
 private void LoadLookups()
 {
     GOVERNORATE objGov = new GOVERNORATE();
     objGov.LoadAll();
 }
Esempio n. 8
0
    /// <summary>
    /// load lookup data.
    /// </summary>
    private void LoadLookups()
    {
        GOVERNORATE objGov = new GOVERNORATE();
        objGov.LoadAll();

        drpState.DataSource = objGov.DefaultView;
        drpState.DataTextField = GOVERNORATE.ColumnNames.DESCR;
        drpState.DataValueField = GOVERNORATE.ColumnNames.CD;
        drpState.DataBind();
        drpState.SelectedIndex = 0;
    }