Ejemplo n.º 1
0
 public static int Login(string username, string password, string server)
 {
     // Login : trả về bool, thành công - thất bại
     // Hoặc tra về errorCode
     if (DAOAccount.Login(username, password, server))
     {
         return(0);
     }
     return(1);
 }
Ejemplo n.º 2
0
 protected void btnSign_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         DAOAccount.Register(txtEmailSign.Text, txtPasswordSign.Text, txtName.Text, txtSDT.Text, txtDiaChi.Text, Convert.ToDateTime(txtDOB.Text));
         Response.Write("<script>alert('Đăng kí thành công rồi bạn ơi =))');</script>");
     }
     catch (FormatException ex)
     {
         Response.Write("<script>alert('Xay Ra Loi');</script>");
     }
 }
Ejemplo n.º 3
0
        //gold
        public static long GetTotalGold(bool bForceUpdate)
        {
            if (bForceUpdate)
            {
                DAOAccount.GoToGoldPage();
                DAOAccount.GetTotalGold();

                return(Gloval.Database.Account.TotalGold);
            }
            else
            {
                return(Gloval.Database.Account.TotalGold);
            }
        }
Ejemplo n.º 4
0
        public void LogIn()
        {
            AccountView.printAccountDetails("Login: "******"Password: "******"\nTry again because Login or Password is wrong!");
                Console.WriteLine("Create new acconunt if you don't have.");
                LogIn();
            }
            else
            {
                string CustomerName = customer.FirstName;
                Console.Write("\n");
                Console.WriteLine($"\nHello {CustomerName} in our shop. Now You may buy want You need :)\n");
            }
        }
Ejemplo n.º 5
0
        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            int soAccount = DAOAccount.CheckAccount(txtEmailLog.Text, txtPasswordLog.Text).Rows.Count;

            if (soAccount == 1)
            {
                AccountModel acc = new AccountModel();
                txtEmailacc.Text      = acc.Email = txtEmailLog.Text;
                acc.Password          = txtPasswordLog.Text;
                txtNameacc.Text       = acc.Ten = DAOAccount.CheckAccount(txtEmailLog.Text, txtPasswordLog.Text).Rows[0]["ten"].ToString();
                txtSdtacc.Text        = acc.SDT = DAOAccount.CheckAccount(txtEmailLog.Text, txtPasswordLog.Text).Rows[0]["sdt"].ToString();
                txtDiaChiacc.Text     = acc.DiaChi = DAOAccount.CheckAccount(txtEmailLog.Text, txtPasswordLog.Text).Rows[0]["diachi"].ToString();
                txtNgaySinhacc.Text   = acc.SinhNhat = DAOAccount.CheckAccount(txtEmailLog.Text, txtPasswordLog.Text).Rows[0]["sinhnhat"].ToString();
                Session["accSession"] = acc;
                btnAccount.ImageUrl   = "~/images/person.PNG";
            }
            else
            {
                Response.Write("<script>alert('Tên tài khoản hoặc mật khẩu sai!!!');</script>");
            }
            {
            }
        }
Ejemplo n.º 6
0
 public static void Logout()
 {
     DAOAccount.Logout();
 }
Ejemplo n.º 7
0
 public static void AutoLoadDefaultPage()
 {
     DAOAccount.GoToGoldPage();
 }
Ejemplo n.º 8
0
 //adv statuc
 public static int CheckAdvStatus()
 {
     return(DAOAccount.CheckAdvStatus());
 }
Ejemplo n.º 9
0
 public static void AutoLoadDefaultPage()
 {
     DAOAccount.GoToGoldPage();
     Gloval.Database.CurrentView = Data.SITE_VIEW.GOLD_PAGE;
 }