private void clearAll() { //lib.conn_open(); try { DataTable dt = lib.getDataTable("SELECT dbo.genId('kredit')"); txtNoKontrak.Value = dt.Rows[0][0].ToString(); txtNoKontrak.ReadOnly = true; txtNoKontrak.BackColor = System.Drawing.Color.LightGray; txtNama.Text = ""; txtAlamat.Text = ""; txtKtp.Value = ""; txtLimit.Value = ""; txtTenor.Value = ""; txtAngsuran.Value = ""; txtBunga.Value = ""; txtStatusPernikahan.SelectedIndex = -1; txtStatusPernikahan.Focus(); txtNama.Focus(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Perhatian", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void clearAll() { //lib.conn_open(); try { DataTable dt = lib.getDataTable("SELECT dbo.genId('bayar')"); txtIDBayar.Value = dt.Rows[0][0].ToString(); txtIDBayar.ReadOnly = true; txtIDBayar.BackColor = System.Drawing.Color.LightGray; txtNama.Value = ""; lblSisaBulan.Text = ""; lblSisaTagihan.Text = ""; txtNoKontrak.Value = ""; txtTgl.Text = DateTime.Now.ToString(); txtBayarKe.Value = ""; } catch (Exception ex) { MessageBox.Show(ex.Message, "Perhatian", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void PopUpFindKontrak_Load(object sender, EventArgs e) { lib.conn_open(); try { DataTable dt = lib.getDataTable(@" SELECT a.* FROM VW_KREDIT a join kredit b on a.[No.Kontrak] = b.kontrakid WHERE VOID_DATE IS null"); dataGridView1.DataSource = dt; } catch (Exception ex) { MessageBox.Show(ex.Message, "Perhatian", MessageBoxButtons.OK, MessageBoxIcon.Error); } lib.conn_close(); }