protected void BtnLogin_Click(object sender, EventArgs e) { string Nama = string.Empty; string Kode = string.Empty; Nama = TbNmToko.Text; Kode = TbKodeSup.Text; Koneksi_ADO cn = new Koneksi_ADO(); string sql = "Select nama_toko, kode_suplier from suplier where nama_toko = '" + TbNmToko.Text + "' and kode_suplier = " + Convert.ToInt32(TbKodeSup.Text) + " "; bool hasil; hasil = cn.kelaskonesi_loginAll(sql); if (hasil == true) { Session["Username_ID"] = TbKodeSup.Text; Response.Write("<script language='javascript'>window.alert('Yeay Suskes Login !');window.location='../Insert_Update_Stock.aspx';</script>"); } else { Response.Write("<script language='javascript'>window.alert('Gagal Login !');window.location='../Suplier_Login.aspx';</script>"); } }
protected void BtnLogin_Click(object sender, EventArgs e) { // Deklarasi Variabel string Kode = string.Empty; string Nama = string.Empty; string Alamat = string.Empty; string Email = string.Empty; string Jenis = string.Empty; string Slogan = string.Empty; Kode = TbKodeSup.Text; Nama = TbNmToko.Text; Alamat = TbAlamat.Text; Email = TbEmail.Text; Jenis = TbJenToko.Text; Slogan = TbSlogan.Text; //Pemanggil Fungsi Koneksi_ADO cn = new Koneksi_ADO(); string sql = "Insert into suplier values (" + Convert.ToInt32(TbKodeSup.Text) + ", '" + TbNmToko.Text + "', '" + TbAlamat.Text + "', '" + TbEmail.Text + "', '" + TbJenToko.Text + "', '" + TbSlogan.Text + "')"; string Hasil = cn.KelasKoneksi_CRUD(sql); if (Hasil == "1") { Response.Write("<script language='javascript'>window.alert('Sukses Menyimpan Data !');window.location='../Suplier_Login.aspx';</script>"); } else { Response.Write("<script language='javascript'>window.alert('Gagal Menyimpan Data!');window.location='../SupReg.aspx';</script>"); } }
protected void BtnLogin_Click(object sender, EventArgs e) { Koneksi_ADO cn = new Koneksi_ADO(); bool hasil; hasil = cn.kelaskonesi_login(TbUsername.Text, TbPass.Text); if (hasil == true) { Session["Username_ID"] = TbUsername.Text; if (DdlLoginAs.SelectedItem.Text == "Admin") { Response.Write("<script language='javascript'>window.alert('Can not Login as Admin !');window.location='../Login.aspx';</script>"); } else if (DdlLoginAs.SelectedItem.Text == "Customer") { Response.Write("<script language='javascript'>window.alert('Yeay... Berhasil Login!');window.location='../#.aspx';</script>"); } } else { Response.Write("<script language='javascript'>window.alert('Gagal Login !');window.location='../Login.aspx';</script>"); } }
protected void BtnLogin_Click(object sender, EventArgs e) { // Deklarasi Variabel string nama = string.Empty; string username = string.Empty; string pass = string.Empty; string alamat = string.Empty; string email = string.Empty; nama = TbNama.Text; username = TbUsername.Text; pass = TbPass.Text; alamat = TbAlamat.Text; email = TbEmail.Text; //Pemanggil Fungsi Koneksi_ADO cn = new Koneksi_ADO(); string Hasil = cn.ClassKoneksi_Insert(nama, username, pass, alamat, email); if (Hasil == "1") { Response.Write("<script language='javascript'>window.alert('Sukses Menyimpan Data !');window.location='../Login.aspx';</script>"); } else { Response.Write("<script language='javascript'>window.alert('Gagal Menyimpan Data!');window.location='../Regi.aspx';</script>"); } }