public void loadClientInformation(int ClientID) { mainDSTableAdapters.ClientTableAdapter client = new mainDSTableAdapters.ClientTableAdapter(); mainDS.ClientDataTable cinfo = client.GetClientProfile(ClientID); if (cinfo.Count > 0) { try { mainDS.ClientRow rinfo = cinfo[0]; lblClientName.InnerText = rinfo.datClientName.ToString(); lblClientNo.InnerText = rinfo.datClientNumber.ToString(); string ctype = "Individual"; if (rinfo.datClientType == 2) { ctype = "Corporate"; } lblClientType.InnerText = ctype; lblEmail.InnerText = rinfo.datEmailAddress; lblMobile.InnerText = rinfo.datMobileNumber1 + " " + rinfo.datMobileNumber2; lblNationality.InnerText = rinfo.datNationality.ToString(); lblPostalAddress.InnerText = rinfo.datPostalAddress; lblResAddress.InnerText = rinfo.datCurrentResidentialAddress; lblTelephone.InnerText = rinfo.datHomeTelephoneNumber; } catch (Exception ex) { } } }
public void loadCompanyDetails(int clientID) { try { mainDSTableAdapters.ClientTableAdapter client = new mainDSTableAdapters.ClientTableAdapter(); mainDS.ClientRow tblClient = client.GetClientProfile(MySessionManager.ClientID)[0]; LoanDSTableAdapters.CoporateInformationTableAdapter companyDetails = new LoanDSTableAdapters.CoporateInformationTableAdapter(); LoanDS.CoporateInformationDataTable tblCompanyDetails = companyDetails.GetCoporateInformation(MySessionManager.ClientID); if (tblCompanyDetails.Rows.Count > 0) { txtCompanyName.Value = tblCompanyDetails[0].datCompanyName.ToString(); txtCommencementDate.Text = tblCompanyDetails[0].datCommencementDate.ToShortDateString(); txtNatureofbusiness.Value = tblCompanyDetails[0].datNatureOfBusiness.ToString(); txtPhysicalAddress.Value = tblCompanyDetails[0].datPhysicalAddress.ToString(); txtRegistrationNumber.Text = tblCompanyDetails[0].datRegistrationNumber.ToString(); txtRegistrationDate.Text = tblCompanyDetails[0].datRegistrationDate.ToShortDateString(); txtYearsInBusiness.Value = tblCompanyDetails[0].datYearsInBusiness.ToString(); txtwebsite.Value = tblCompanyDetails[0].datWebsite.ToString(); txtVATNo.Value = tblCompanyDetails[0].datVATNumber.ToString(); txtTIN.Value = tblCompanyDetails[0].datTIN.ToString(); if (tblCompanyDetails[0].IsdatTelephoneNumber1Null() == false) { txtTel1.Value = tblCompanyDetails[0].datTelephoneNumber1.ToString(); } else if (tblClient.IsdatMobileNumber1Null() == false) { txtTel1.Value = tblClient.datMobileNumber1.ToString(); } if (tblCompanyDetails[0].IsdatTelephoneNumber2Null() == false) { txtTel2.Value = tblCompanyDetails[0].datTelephoneNumber2.ToString(); } else if (tblClient.IsdatMobileNumber2Null() == false) { txtTel2.Value = tblClient.datMobileNumber2.ToString(); } txtTel2.Value = tblCompanyDetails[0].datTelephoneNumber2.ToString(); txtFax.Value = tblCompanyDetails[0].datFaxNumber.ToString(); if (tblCompanyDetails[0].IsdatIndustryTypeNull() == false) { ddlIndustryType.SelectedValue = tblCompanyDetails[0].datIndustryType.ToString(); } //if (tblCompanyDetails[0].IsdatSectorNull()==false) { if(ddlIndustryType.SelectedValue = tblCompanyDetails[0].datSector.ToString(); } if (tblCompanyDetails[0].IsdatPremissesStatusNull() == false) { ddlPremisesStatus.SelectedValue = tblCompanyDetails[0].datPremissesStatus.ToString(); } if (tblCompanyDetails[0].IsdatIsRegisteredNull() == false) { ddlRegistered.SelectedValue = tblCompanyDetails[0].datIsRegistered.ToString(); } this.type.Value = "update"; this.editskip.Value = "2"; } } catch (Exception ex) { } }
public void UpdateIndividualClient() { //Get Clients profile information mainDSTableAdapters.ClientTableAdapter client = new mainDSTableAdapters.ClientTableAdapter(); mainDS.ClientRow tblClient = client.GetClientProfile(MySessionManager.ClientID)[0]; string Fullname = tblClient.datFirstName.ToString() + " " + tblClient.datMiddleName.ToString() + " " + tblClient.datSurname.ToString(); //Delete all initiators tied up the application LoanDSTableAdapters.IntiatorTableAdapter initiator = new LoanDSTableAdapters.IntiatorTableAdapter(); initiator.DeleteInitiator(MySessionManager.AppID, MySessionManager.ClientID); LoanDSTableAdapters.LoanApplicationsTableAdapter loanApp = new LoanDSTableAdapters.LoanApplicationsTableAdapter(); loanApp.UpdateClientName(Fullname, MySessionManager.ClientID); }
public void UpdateCompanyClientName(string ClientName) { //Copy the Initiator Details From the Clients Table mainDSTableAdapters.ClientTableAdapter client = new mainDSTableAdapters.ClientTableAdapter(); mainDS.ClientRow tblClient = client.GetClientProfile(MySessionManager.ClientID)[0]; string Fullname = tblClient.datFirstName.ToString() + tblClient.datMiddleName.ToString() + tblClient.datSurname.ToString(); LoanDSTableAdapters.IntiatorTableAdapter initiator = new LoanDSTableAdapters.IntiatorTableAdapter(); initiator.InsertInitiator(MySessionManager.AppID, MySessionManager.ClientID, Fullname, null, tblClient.datMobileNumber1.ToString(), tblClient.datHomeTelephoneNumber.ToString(), tblClient.datEmailAddress.ToString(), tblClient.datFaxNumber.ToString(), tblClient.datCurrentResidentialAddress.ToString()); LoanDSTableAdapters.LoanApplicationsTableAdapter loanApp = new LoanDSTableAdapters.LoanApplicationsTableAdapter(); loanApp.UpdateClientName(ClientName, MySessionManager.ClientID); }