예제 #1
0
 public static void LoadData(baseDS.investorDataTable tbl, string code)
 {
     investorTA.ClearBeforeFill = false;
     if (code == null)
     {
         investorTA.Fill(tbl);
     }
     else
     {
         investorTA.FillByCode(tbl, code);
     }
 }
예제 #2
0
        //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();
        }
예제 #3
0
        public static void LoadInvestor(baseDS.investorDataTable tbl, string cond)
        {
            string sqlCmd = "SELECT * FROM investor WHERE " + cond;

            LoadFromSQL(tbl, sqlCmd);
        }
예제 #4
0
 public static void LoadInvestorByEmail(baseDS.investorDataTable tbl, string email)
 {
     investorTA.ClearBeforeFill = false;
     investorTA.FillByEmail(tbl, email);
 }
예제 #5
0
 public static void LoadInvestorByAccount(baseDS.investorDataTable tbl, string account)
 {
     investorTA.ClearBeforeFill = false;
     investorTA.FillByAccount(tbl, account);
 }
예제 #6
0
 public static void UpdateData(baseDS.investorDataTable tbl)
 {
     investorTA.Update(tbl);
     tbl.AcceptChanges();
 }