private void button5_Click(object sender, EventArgs e) // verifikasi button ya { if (TSC_C.statusTransaksiCustomer(txtIDCustomer.Text) == "InProgress" || TSC_C.statusTransaksiCustomer(txtIDCustomer.Text) == "Receivable") { DialogResult dr = MessageBox.Show("Customer tersebut memiliki transaksi yang sedang berlangsung / belum lunas.", "iNBC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } else { if (currentShift == "No such shift") { DialogResult dr = MessageBox.Show("Pendaftaran hanya bisa dilakukan pada jam aktif klinik", "iNBC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } else { if (CUS_C.tryVerify(txtIDCustomer.Text) == 1) { errorProvider1.Clear(); button5.Visible = false; enabled(); rightProvider.Visible = true; } else { errorProvider1.SetError(button5, "ID Customer tidak valid"); } } } }
private void button5_Click(object sender, EventArgs e) // verifikasi button ya { if (TSC_C.statusTransaksiCustomer(txtIDCustomer.Text) == "Receivable" || TSC_C.statusTransaksiCustomer(txtIDCustomer.Text) == "InProgress") { DialogResult dr = MessageBox.Show("Customer tersebut memiliki transaksi yang sedang berlangsung / belum lunas.", "iNBC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } else { if (currentShift == "No such shift") { DialogResult dr = MessageBox.Show("Pendaftaran hanya bisa dilakukan pada jam aktif klinik", "iNBC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } else { if (CUS_C.tryVerify(txtIDCustomer.Text) == 1) { txtIDCustomer.Enabled = false; errorProvider1.Clear(); button5.Visible = false; enabled(); rightProvider.Visible = true; jkCustomer = TSC_C.getJenisKelaminCustomerByIDCus(txtIDCustomer.Text); if (jkCustomer == "Perempuan") { cmbBeautician.DataSource = TSC_C.getBeauticianCewekAvailable(currentShift, hariIni); cmbBeautician.DisplayMember = "NAMAPGW"; } else if (jkCustomer == "Laki-laki") { cmbBeautician.DataSource = TSC_C.getBeauticianCowokAvailable(currentShift, hariIni); cmbBeautician.DisplayMember = "NAMAPGW"; } rightProvider.Visible = true; iNBC.Entity.Transaksi T = new Entity.Transaksi(idTransaksi.Text, txtIDCustomer.Text, 0, "-", 23, System.DateTime.Now, txtKeluhan.Text, 0, "InProgress", 1); TSC_C.addTransaksi(T); } else { errorProvider1.SetError(button5, "ID Customer tidak valid"); } } } }