示例#1
0
 private void b_save_Click(object sender, EventArgs e)
 {
     if (cmb_type.Text == "Cash")
     {
         if (t_bayar.TextLength != 0)
         {
             con.CUD("UPDATE tb_orderHeader set Emp_id = '" + Flogin.getId() + "', PaymentType = '" + cmb_type.Text + "' where id = '" + cmb_id.Text + "'", "Transaksi Berhasil");
         }
     }
     else
     {
         if (t_card.Text.Length != 0)
         {
             con.CUD("UPDATE tb_orderHeader set Emp_id = '" + Flogin.getId() + "', PaymentType = '" + cmb_type.Text + "', CardNumber ='" + t_card.Text + "', Bank = '" + t_bank.Text + "' where id = '" + cmb_id.Text + "'", "Transaksi Berhasil");
         }
     }
     bersih();
     dataGridView1.DataSource = null;
     cmb_id.Items.Clear();
     GetIdOrder();
 }
 private void simpanMaster()
 {
     con.CUD("INSERT into tb_orderHeader(id,Emp_id,Mem_id,Date) values('" + urut + "', '" + Flogin.getId() + "', '" + t_idpel.Text + "', '" + DateTime.Now.ToString("yyyy-MM-dd") + "')", "Sukses Menambahkan Data!");
 }
示例#3
0
        private void b_save_Click(object sender, EventArgs e)
        {
            con.setSHA512(tplama.Text);
            string hasil = con.getSHA512();

            if (tplama.Text == "" || tpbaru.Text == "" || tcpass.Text == "")
            {
                MessageBox.Show("Isilah Semua textboxt yang tersedia!", "Informasi");
            }
            else if (hasil != pass)
            {
                MessageBox.Show("Password lama salah, silahkan cek kembali", "Informasi");
                tplama.Clear();
            }
            else if (tpbaru.Text != tcpass.Text)
            {
                MessageBox.Show("Password tidak sama!", "Informasi");
                tcpass.Clear();
            }
            else
            {
                con.setSHA512(tpbaru.Text);
                string newpass = con.getSHA512();
                con.CUD("UPDATE tb_employee set password = '******' where Id= '" + Flogin.getId() + "'", "Password telah berhasil Diubah");
                setAwal();
            }
        }
示例#4
0
 private void ambilData()
 {
     try
     {
         cmd    = new SqlCommand("SELECT password from tb_employee where Id = '" + Flogin.getId() + "'", con.Buka());
         reader = cmd.ExecuteReader();
         if (reader.Read())
         {
             pass = reader["password"].ToString();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     finally
     {
         reader.Close();
         con.Tutup();
     }
 }
 private void CashierNav_Load(object sender, EventArgs e)
 {
     t_nama.Text = "Welcome," + Flogin.getNama();
 }
示例#6
0
 private void AdminNavigation_Load(object sender, EventArgs e)
 {
     t_nama.Text = "Welcome," + Flogin.getNama();
 }