/// <summary> /// /// </summary> /// <param name="objInvestor"></param> /// <returns></returns> internal bool UpdateInvestorProfile(Business.Investor objInvestor) { bool Result = false; System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(DBConnection.DBConnection.Connection); DSTableAdapters.InvestorProfileTableAdapter adap = new DSTableAdapters.InvestorProfileTableAdapter(); try { conn.Open(); adap.Connection = conn; int ResultUpdate = adap.UpdateInvestorProfile(objInvestor.InvestorID, objInvestor.Address, objInvestor.Phone, objInvestor.City, objInvestor.Country, objInvestor.Email, objInvestor.ZipCode, objInvestor.InvestorComment, objInvestor.State, objInvestor.NickName, objInvestor.IDPassport, objInvestor.InvestorProfileID); if (ResultUpdate > 0) Result = true; } catch (Exception ex) { return false; } finally { adap.Connection.Close(); conn.Close(); } return Result; }
/// <summary> /// /// </summary> /// <param name="objInvestorProfile"></param> internal void UpdateInvestorProfile(Business.Investor objInvestorProfile) { System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(DBConnection.DBConnection.Connection); DSTableAdapters.InvestorProfileTableAdapter adap = new DSTableAdapters.InvestorProfileTableAdapter(); try { conn.Open(); adap.Connection = conn; adap.UpdateInvestorProfile(objInvestorProfile.InvestorID, objInvestorProfile.Address, objInvestorProfile.Phone, objInvestorProfile.City, objInvestorProfile.Country, objInvestorProfile.Email, objInvestorProfile.ZipCode, objInvestorProfile.InvestorComment, objInvestorProfile.State, objInvestorProfile.NickName, objInvestorProfile.IDPassport, objInvestorProfile.InvestorProfileID); } catch (Exception ex) { } finally { adap.Connection.Close(); conn.Close(); } }