private void frmJournalUpdate_Load(object sender, EventArgs e) { try { this.Cursor = Cursors.WaitCursor; using (Database db = new Database(GlobalVar.DBName)) { dtRowHeader = Class.Journal.GetHeader(db, _rowID); dtRowDetail = Class.Journal.ListDetail(db, _rowID); dtRowDetailAwal = dtRowDetail.Copy(); dtDeleteee = new DataTable(); dtDeleteee = dtRowDetail.Clone(); //dtDeleteee.Clear(); } if (formMode == enumFormMode.Update) { //retrieving data if (dtRowHeader.Rows.Count > 0) { //display data txtTanggal.Text = ((DateTime)dtRowHeader.Rows[0]["Tanggal"]).ToString("dd/MM/yyyy"); txtNoReff.Text = dtRowHeader.Rows[0]["NoReff"].ToString(); txtUraian.Text = dtRowHeader.Rows[0]["Uraian"].ToString(); _src = dtRowHeader.Rows[0]["Src"].ToString();; lookupGudang1.GudangID = dtRowHeader.Rows[0]["KodeGudang"].ToString(); dtRowDetail.DefaultView.Sort = "DK, RecordID, NoPerkiraan"; customGridView1.DataSource = dtRowDetail.DefaultView; } } else { txtTanggal.Text = DateTime.Now.ToString("dd/MM/yyyy"); txtNoReff.Text = Numerator.GetNextNumerator("ADJ"); lookupGudang1.GudangID = GlobalVar.Gudang; _src = "GNR"; dtRowDetail.DefaultView.Sort = "RecordID"; customGridView1.DataSource = dtRowDetail.DefaultView; } HitungTotal(); } catch (Exception ex) { Error.LogError(ex); } finally { this.Cursor = Cursors.Default; } }
private void getNo() { try { if (kdTransaksi == "KM1") { nobbk = Numerator.GetNextNumerator("BBK"); nobgch = Numerator.GetNextNumerator("BKM"); } else if (kdTransaksi == "KK1") { nobbk = Numerator.GetNextNumerator("BBM"); nobgch = Numerator.GetNextNumerator("BKK"); } else if (kdTransaksi == "BM1") { nobbk = Numerator.GetNextNumerator("BBK"); nobgch = Numerator.GetNextNumerator("BBM"); } else if (kdTransaksi == "BK2") { nobbk = Numerator.GetNextNumerator("BBK"); nobgch = nobbk; } else if (kdTransaksi == "BM2") { nobbk = Numerator.GetNextNumerator("BBM"); nobgch = nobbk; } else if (kdTransaksi == "BBM") { nobbk = Numerator.GetNextNumerator("BBM"); nobgch = nobbk; } } catch (Exception ex) { Error.LogError(ex); } }
private void frmVoucherGiroTitipUpdate_Load(object sender, EventArgs e) { tbTanggal.DateValue = DateTime.Today; tbDibuat.Text = SecurityManager.UserName; tbNoVch.Text = Numerator.GetNextNumerator("VTG"); }