public int getSpouseID()
    {
        int ID;

        LoanDSTableAdapters.GetSpouseTableAdapter spouse = new LoanDSTableAdapters.GetSpouseTableAdapter();
        LoanDS.GetSpouseDataTable tblSpouse = spouse.GetSpouse(MySessionManager.AppID, MySessionManager.ClientID);

        if (tblSpouse.Rows.Count > 0)
        {
            ID = int.Parse(tblSpouse[0].datID.ToString());
        }
        else
        {
            ID = 0;
        }

        return(ID);
    }
    public void loadSpouseDetails()
    {
        LoanDSTableAdapters.GetSpouseTableAdapter spouse = new LoanDSTableAdapters.GetSpouseTableAdapter();
        LoanDS.GetSpouseDataTable tblSpouse = spouse.GetSpouse(MySessionManager.AppID, MySessionManager.ClientID);

        if (tblSpouse.Rows.Count > 0)
        {
            txtContactPersion.Value   = tblSpouse[0].datContactPerson.ToString();
            txtDateMarried.Text       = tblSpouse[0].datDateMarried.ToString("dd-MM-yyyy");
            txtNameOfDependents.Value = tblSpouse[0].datNumberOfDependents.ToString();
            txtEmpNo.Value            = tblSpouse[0].datEmployeeNumber.ToString();
            txtFullName.Value         = tblSpouse[0].datFullName.ToString();
            txtMonthly.Value          = tblSpouse[0].datMonthlyIncome.ToString();
            txtPhysicalAddress.Value  = tblSpouse[0].datEmployerAddress.ToString();
            txtidNo.Value             = tblSpouse[0].datIdentificationNumber.ToString();
            //ddlNo1.SelectedIndex = ddlNo1.Items.IndexOf(ddlNo1.Items.FindByText(tblSpouse[0].idtype.ToString()));
            telno.Value       = tblSpouse[0].datTelephoneNumber.ToString();
            txtPosition.Value = tblSpouse[0].datPosition.ToString();
        }
    }