public void getProfileType(int ClientID) { try { mainDSTableAdapters.ClientTableAdapter client = new mainDSTableAdapters.ClientTableAdapter(); int? type = int.Parse(client.GetClientType(ClientID).ToString()); if (type == 1) { this.individualclientprofile.Visible = true; this.enterpriseclientprofile.Visible = false; this.coporateclientprofile.Visible = false; } else if (type == 2) { this.individualclientprofile.Visible = false; this.enterpriseclientprofile.Visible = false; this.coporateclientprofile.Visible = true; } else if (type == 3) { this.individualclientprofile.Visible = true; this.enterpriseclientprofile.Visible = false; this.coporateclientprofile.Visible = false; } } catch (Exception ex) { } }
public void getProfileType(int ClientID) { try { mainDSTableAdapters.ClientTableAdapter client = new mainDSTableAdapters.ClientTableAdapter(); int?type = int.Parse(client.GetClientType(ClientID).ToString()); if (type == 1) { this.individualclientprofile.Visible = true; this.enterpriseclientprofile.Visible = false; this.coporateclientprofile.Visible = false; } else if (type == 2) { this.individualclientprofile.Visible = false; this.enterpriseclientprofile.Visible = false; this.coporateclientprofile.Visible = true; } else if (type == 3) { this.individualclientprofile.Visible = true; this.enterpriseclientprofile.Visible = false; this.coporateclientprofile.Visible = false; } } catch (Exception ex) { } }
protected void btnApply_Click(object sender, EventArgs e) { mainDSTableAdapters.ClientTableAdapter client = new mainDSTableAdapters.ClientTableAdapter(); string EncID = this.ckey.Value; //Request.QueryString["id"]; int DecID = Convert.ToInt32(MyEncryption.Decrypt(EncID, "12345678910")); int cType = Convert.ToInt32(client.GetClientType(DecID)); if (ddlProducts.SelectedValue == "1") { int lType = 0; if (cType == 1) { lType = 1; } else if (cType == 2) { lType = 2; } else if (cType == 3) { lType = 4; } LoanDSTableAdapters.LoanApplicationsTableAdapter loanApp = new LoanDSTableAdapters.LoanApplicationsTableAdapter(); string clientname = client.GetClientsName(DecID).ToString(); loanApp.InsertNewApplication(DecID, clientname, lType, MySessionManager.CurrentUser.BranchID, MySessionManager.CurrentUser.UserID); ShowMessageBox("Loan Application for " + clientname + " submited successfully"); } else if (ddlProducts.SelectedValue == "2") { string clientname = client.GetClientsName(DecID).ToString(); InvestmentDSTableAdapters.GetInvestmentAppTableAdapter invapp = new InvestmentDSTableAdapters.GetInvestmentAppTableAdapter(); invapp.InsertInvestmentApplication(DecID, clientname, 1, MySessionManager.CurrentUser.BranchID); ShowMessageBox("Investment Application for " + clientname + " submited successfully"); } }
protected void btnApply_Click(object sender, EventArgs e) { mainDSTableAdapters.ClientTableAdapter client = new mainDSTableAdapters.ClientTableAdapter(); string EncID = this.ckey.Value; //Request.QueryString["id"]; int DecID = Convert.ToInt32(MyEncryption.Decrypt(EncID, "12345678910")); int cType = Convert.ToInt32(client.GetClientType(DecID)); if (ddlProducts.SelectedValue == "1") { int lType=0; if (cType == 1) { lType = 1; } else if (cType == 2) { lType = 2; } else if (cType == 3) { lType = 4; } LoanDSTableAdapters.LoanApplicationsTableAdapter loanApp = new LoanDSTableAdapters.LoanApplicationsTableAdapter(); string clientname = client.GetClientsName(DecID).ToString(); loanApp.InsertNewApplication(DecID, clientname, lType, MySessionManager.CurrentUser.BranchID, MySessionManager.CurrentUser.UserID); ShowMessageBox("Loan Application for " + clientname + " submited successfully"); } else if(ddlProducts.SelectedValue=="2") { string clientname = client.GetClientsName(DecID).ToString(); InvestmentDSTableAdapters.GetInvestmentAppTableAdapter invapp = new InvestmentDSTableAdapters.GetInvestmentAppTableAdapter(); invapp.InsertInvestmentApplication(DecID, clientname, 1, MySessionManager.CurrentUser.BranchID); ShowMessageBox("Investment Application for " + clientname + " submited successfully"); } }