public static void LoadData(baseDS.investorDataTable tbl, string code) { investorTA.ClearBeforeFill = false; if (code == null) { investorTA.Fill(tbl); } else { investorTA.FillByCode(tbl, code); } }
//Tuan - Insert new user to database, no parametter public void InsertNew() { OpenConn(); DateTime time = DateTime.Now; //baseDS.investorDataTable dt=client.GetInvestor_ByCode("A00000004"); baseDS.investorDataTable dt = new baseDS.investorDataTable(); baseDS.investorRow row = dt.NewinvestorRow(); row.code = commonTypes.Consts.constNotMarkerNEW; row.catCode = string.Empty; row.account = Username; row.firstName = Firstname; row.email = Email; row.password = Password; row.lastName = Lastname; row.address1 = Company; row.address2 = StockCompany; row.city = string.Empty; row.country = string.Empty; row.displayName = row.firstName; row.phone = Phone; row.sex = 0; row.status = 0; row.type = 0; row.expireDate = DateTime.Now.AddMonths(3); dt.AddinvestorRow(row); client.UpdateInvestor(ref dt); // Use the 'client' variable to call operations on the service. // Always close the client. client.Close(); }
public static void LoadInvestor(baseDS.investorDataTable tbl, string cond) { string sqlCmd = "SELECT * FROM investor WHERE " + cond; LoadFromSQL(tbl, sqlCmd); }
public static void LoadInvestorByEmail(baseDS.investorDataTable tbl, string email) { investorTA.ClearBeforeFill = false; investorTA.FillByEmail(tbl, email); }
public static void LoadInvestorByAccount(baseDS.investorDataTable tbl, string account) { investorTA.ClearBeforeFill = false; investorTA.FillByAccount(tbl, account); }
public static void UpdateData(baseDS.investorDataTable tbl) { investorTA.Update(tbl); tbl.AcceptChanges(); }