public int getEmpDetails(int ClientID)
    {
        int id = 0;

        LoanDSTableAdapters.EmploymentDetailsTableAdapter empDetails = new LoanDSTableAdapters.EmploymentDetailsTableAdapter();
        LoanDS.EmploymentDetailsDataTable tblEmpDetails = empDetails.GetEmploymentDetails(MySessionManager.ClientID);

        if (tblEmpDetails.Rows.Count > 0)
        {
            id = Convert.ToInt32(tblEmpDetails[0].datID.ToString());
        }

        return(id);
    }
    public void loadEmploymentDetails()
    {
        LoanDSTableAdapters.EmploymentDetailsTableAdapter empDetails = new LoanDSTableAdapters.EmploymentDetailsTableAdapter();
        LoanDS.EmploymentDetailsDataTable tblEmpDetails = empDetails.GetEmploymentDetails(MySessionManager.ClientID);

        if (tblEmpDetails.Rows.Count > 0)
        {
            txtcompanyname.Value        = tblEmpDetails[0].datCompanyName.ToString();
            txtPhysicalAddress.Value    = tblEmpDetails[0].datPhysicalAddress.ToString();
            txtposition.Value           = tblEmpDetails[0].datPosition.ToString();
            txtOtherincome.Value        = tblEmpDetails[0].datOtherIncome.ToString();
            txtStaff.Value              = tblEmpDetails[0].datStaffID.ToString();
            txtTel.Value                = tblEmpDetails[0].datTelephoneNumber.ToString();
            txtmonthly.Value            = tblEmpDetails[0].datMonthlyIncome.ToString();
            txtFaxNumber.Value          = tblEmpDetails[0].datFaxNumber.ToString();
            txtMonthlyExpenditure.Value = tblEmpDetails[0].datMonthlyExpenditure.ToString();
            txtDisposableIncome.Value   = tblEmpDetails[0].datDisposalbleIncome.ToString();
            txtEmploymentDate.Text      = tblEmpDetails[0].datDateOfEmployment.ToString("dd-MM-yyyy");
            this.editskip.Value         = "2";
        }
    }