Beispiel #1
0
    public int getReligionID()
    {
        int ID;

        LoanDSTableAdapters.ReligionDetailsTableAdapter religionDetails = new LoanDSTableAdapters.ReligionDetailsTableAdapter();
        LoanDS.ReligionDetailsDataTable tblReligionDetails = religionDetails.GetReligionDetails(MySessionManager.AppID, MySessionManager.ClientID);

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

        return(ID);
    }
Beispiel #2
0
    public void loadReligion()
    {
        LoanDSTableAdapters.ReligionDetailsTableAdapter religionDetails = new LoanDSTableAdapters.ReligionDetailsTableAdapter();
        LoanDS.ReligionDetailsDataTable tblReligionDetails = religionDetails.GetReligionDetails(MySessionManager.AppID, MySessionManager.ClientID);

        if (tblReligionDetails.Rows.Count > 0)
        {
            try
            {
                txtNameOfLeader.Value    = tblReligionDetails[0].datLeader.ToString();
                txtPhysicalAddress.Value = tblReligionDetails[0].datPhysicalAddress.ToString();
                txtTel.Value             = tblReligionDetails[0].datTelephoneNumber.ToString();

                if (tblReligionDetails[0].datReligionID > 0)
                {
                    ddlReligion.SelectedValue = tblReligionDetails[0].datReligionID.ToString();
                }
                txtPlaceOfWorship.Value = tblReligionDetails[0].datPlaceOfWorship.ToString();
                this.editskip.Value     = "2";
            }
            catch
            {}
        }
    }