本文整理汇总了C#中Accounting_Solution_Software.DbObject.get_single_data方法的典型用法代码示例。如果您正苦于以下问题:C# DbObject.get_single_data方法的具体用法?C# DbObject.get_single_data怎么用?C# DbObject.get_single_data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Accounting_Solution_Software.DbObject
的用法示例。
在下文中一共展示了DbObject.get_single_data方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Modul_Penjualan_PembayaranPiutang
public Modul_Penjualan_PembayaranPiutang(Modul_Penjualan_DaftarPiutang daftarPiutang, DataGridViewRow dgvRow)
{
/*kodesupplier
namasupplier
faktur
tanggal faktur
saldo hutang
*/
InitializeComponent();
this.daftarPiutang = daftarPiutang;
this.dgvRow = dgvRow;
fakturTxt.Text = dgvRow.Cells[2].Value.ToString();
kodeCustomerTextBox.Text = dgvRow.Cells[0].Value.ToString();
namaCustomerTextBox.Text = dgvRow.Cells[1].Value.ToString();
pembayaranTxt.Text = "0" ;
sisaPiutangTxt.Text = allfunc.digit_separated(dgvRow.Cells[3].Value.ToString());
SqlDataReader sdr = dbo.get_single_data(new string[]{"NO_Bukti","TJT"},"FAKTUR",dgvRow.Cells[2].Value.ToString()+"' AND LOWER(posisiperkiraan) = 'debit","piutang");
while(sdr.Read())
{
tJTDateTimePicker.Value = (DateTime)sdr["TJT"];
noBuktiTxt.Text = (string)sdr["NO_Bukti"];
}
DbObject db1 = new DbObject();
SqlDataReader sdr1 = db1.get_single_data(new string[] { "JumlahPenjualan" }, "nobon", fakturTxt.Text, "jual");
while (sdr1.Read())
{
nominalTextBox.Text = allfunc.digit_separated(Convert.ToString((double)sdr1["JumlahPenjualan"]));
}
if(sisaPiutangTxt.Text.CompareTo("0")==0)
{
bayarBtn.Enabled = false;
}
}
示例2: Modul_Ganti_Operator_Laporan
public Modul_Ganti_Operator_Laporan(Modul_POS pos,Modul_POS_Resep_Dokter resep, Login login)
{
InitializeComponent();
if (pos!=null)
{
this.pos = pos;
}
else if(resep !=null)
{
this.resep = resep;
}
this.login = login;
DbObject dbo = new DbObject();
SqlDataReader sdr = null;
namaOperatorTxt.Text = login.username;
SqlDataReader sdr0 = dbo.get_single_data(new string[]{"JamMulai"},"Username",login.username,"login");
while (sdr0.Read())
{
DateTime jamMulai = (DateTime)sdr0["JamMulai"];
jamMulaiDateTimePicker.Value = Convert.ToDateTime(jamMulai.ToString("HH:mm"));
}
jamSelesaiDateTimePicker.Value = Convert.ToDateTime(DateTime.Now.ToString("HH:mm"));
var timeDiff = new TimeSpan(jamSelesaiDateTimePicker.Value.Ticks - jamMulaiDateTimePicker.Value.Ticks);
lamaBertugasTxt.Text = timeDiff.Hours.ToString();
sdr = tbLogin.getPendapatanObat(DateTime.Today, login.username);
if (sdr.HasRows)
{
while ( sdr.Read())
{
if (sdr["JumlahOmset"]!=DBNull.Value)
{
setDataGrid(new string[] { (string)sdr["NamaKelompok"], allfunc.digit_separated(Convert.ToString((double)sdr["JumlahOmset"])) });
}
else
{
setDataGrid(new string[] { (string)sdr["NamaKelompok"], "0" });
}
}
}
SqlDataReader sdr1 = null;
sdr1 = tbLogin.getPendapatanJasa(DateTime.Today, login.username);
if (sdr1.HasRows)
{
while (sdr1.Read())
{
if (sdr1["JumlahOmset"] != DBNull.Value)
{
setDataGrid(new string[] { (string)sdr1["NamaKelompok"], allfunc.digit_separated(Convert.ToString((double)sdr1["JumlahOmset"])) });
}
else
{
setDataGrid(new string[] { (string)sdr1["NamaKelompok"], "0" });
}
}
}
SqlDataReader sdr2 = null;
sdr2 = tbLogin.getPendapatanResep(DateTime.Today, login.username);
if (sdr2.HasRows)
{
while (sdr2.Read())
{
if (sdr2["JumlahOmset"] != DBNull.Value)
{
setDataGrid(new string[] { (string)sdr2["NamaKelompok"], allfunc.digit_separated(Convert.ToString((double)sdr2["JumlahOmset"])) });
}
else
{
setDataGrid(new string[] { (string)sdr2["NamaKelompok"], "0" });
}
}
}
SqlDataReader sdr3 = null;
sdr3 = tbLogin.getPendapatanPiutang(DateTime.Today, login.username);
if (sdr3.HasRows)
{
while (sdr3.Read())
{
if (sdr3["JumlahOmset"] != DBNull.Value)
{
setDataGridPiutang(new string[] { (string)sdr3["NamaPelanggan"], allfunc.digit_separated(Convert.ToString((double)sdr3["JumlahOmset"])) });
}
else
{
setDataGridPiutang(new string[] { (string)sdr3["NamaPelanggan"], "0" });
}
}
}
SqlDataReader sdr4 = null;
sdr4 = tbLogin.getPendapatanAll(DateTime.Today, login.username);
if (sdr4.HasRows)
{
//.........这里部分代码省略.........
示例3: SimpanBtn_Click
private void SimpanBtn_Click(object sender, EventArgs e)
{
/* SubObj, kas/Utang */
string kodePelanggan = kodePelangganTextBox.Text;
string noBon = noBonTextBox.Text;
SqlDataReader sdr = retJual.InsertRow(DateTime.Today, "", noBon, "",0, 0, 0, 0,"");//RetJual
string noBuktiRetur = "";
while (sdr.Read())
{
noBuktiRetur = (string)sdr["result"];
}
SqlDataReader sdr1 = ju.InsertRow(DateTime.Today, noBuktiRetur, "Retur Penjualan No.Bukti : " + noBuktiRetur); //JurnalUmum
string noBuktiJurnalUmum = "";
while (sdr1.Read())
{
noBuktiJurnalUmum = (string)sdr1["result"];
}
double subJurnalUmumGrandTotal = 0.0;
DataGridView dgv = null;
if (view_subJual_stockDataGridView.RowCount > 0)
{
dgv = view_subJual_stockDataGridView;
}
else if(view_racikan_stock_dokterDataGridView.RowCount >0)
{
dgv = view_racikan_stock_dokterDataGridView;
}
for (int i = 0; i < dgv.RowCount; i++)
{
string kodeStock = dgv.Rows[i].Cells[0].Value.ToString();
double qtyRetur = 0;
if (dgv.Rows[i].Cells[4].Value != null)
{
qtyRetur = Convert.ToDouble(dgv.Rows[i].Cells[4].Value.ToString());
}
string satuan = dgv.Rows[i].Cells[3].Value.ToString();
double hargaBeli = Convert.ToDouble(dgv.Rows[i].Cells[5].Value.ToString());
double discPers = Convert.ToDouble(dgv.Rows[i].Cells[6].Value.ToString());
if (qtyRetur > 0)
{
double subTotal = qtyRetur * hargaBeli;
double disc = subTotal * discPers / 100;
double ppn = 0;
//double ppn = (subTotal - disc) * ppnPers / 100;
double grandTotal = subTotal - disc + ppn;
retSubJual.InsertRow(noBuktiRetur, (float)qtyRetur, kodeStock, (float)hargaBeli, (float)discPers, (float)disc, (float)subTotal, (float)grandTotal);
stock.TambahJumlah(kodeStock, (float)qtyRetur);//stock
subJurnalUmumGrandTotal += grandTotal;
}
}
if (subJurnalUmumGrandTotal == 0)
{
retJual.DeleteRow(noBuktiRetur);
ju.DeleteRow(noBuktiJurnalUmum);
MessageBox.Show("Pencatatan Retur Gagal.");
}
else
{
sju.setDebitSystem(noBuktiJurnalUmum, "11311", "Persediaan Barang Dagang", (float)subJurnalUmumGrandTotal);
//kas atau piutang
if (pembayaranComboBox.Text.ToLower().CompareTo("t") == 0)
{
sju.setKreditSystem(noBuktiJurnalUmum, "11111", "Kas Keluar Retur Penjualan : " + noBuktiRetur, (float)subJurnalUmumGrandTotal);
kas.InsertRowKredit(DateTime.Today, noBuktiRetur, "Kas Keluar Retur Penjualan : " + noBuktiRetur, (float)subJurnalUmumGrandTotal);
}
else
{
DbObject dbo = new DbObject();
SqlDataReader sdr2 = dbo.get_single_data(new string[] { "Saldo" }, "FAKTUR", noBon, "view_piutang_faktur");
double saldoPiutangFaktur = 0;
while (sdr2.Read())
{
saldoPiutangFaktur = (double)sdr2["Saldo"];
}
if (saldoPiutangFaktur == 0)
{
sju.setKreditSystem(noBuktiJurnalUmum, "11111", "Kas Keluar Retur Penjualan : " + noBuktiRetur, (float)subJurnalUmumGrandTotal);
kas.InsertRowKredit(DateTime.Today, noBuktiRetur, "Kas Keluar Retur Penjualan : " + noBuktiRetur, (float)subJurnalUmumGrandTotal);
}
else
{
sju.setKreditSystem(noBuktiJurnalUmum, "11211", "Piutang Usaha", (float)subJurnalUmumGrandTotal);
piutang.InsertRowKredit(DateTime.Today, noBon, kodePelanggan, "TOKO", "TOKO", 0, (float)(subJurnalUmumGrandTotal * -1), DateTime.Today, "", 0);
}
}
MessageBox.Show("Pencatatan Retur Berhasil.");
refreshDataGrid();
tabControl1.SelectedIndex = 2;
}
}
示例4: stockSelectedHandler
private void stockSelectedHandler()
{
String kodeStock = stockDataGridView.Rows[stockDataGridView.CurrentCell.RowIndex].Cells[0].Value.ToString();
String namaStock = stockDataGridView.Rows[stockDataGridView.CurrentCell.RowIndex].Cells[1].Value.ToString();
String satuan = stockDataGridView.Rows[stockDataGridView.CurrentCell.RowIndex].Cells[2].Value.ToString();
//String jmlStockLama = stockDataGridView.Rows[stockDataGridView.CurrentCell.RowIndex].Cells[3].Value.ToString();
//String hargaStockLama = stockDataGridView.Rows[stockDataGridView.CurrentCell.RowIndex].Cells[4].Value.ToString();
String barcode = stockDataGridView.Rows[stockDataGridView.CurrentCell.RowIndex].Cells[16].Value.ToString();
String hargaBeli = stockDataGridView.Rows[stockDataGridView.CurrentCell.RowIndex].Cells[3].Value.ToString();
String jmlStockLama = "";
String hargaStockLama = "";
String[] row = new String[] { kodeStock, namaStock, "", satuan,jmlStockLama,hargaStockLama };
if (formBarangPemindahan != null)
{
String[] row1 = new String[] { barcode ,kodeStock, namaStock, "0",satuan };
this.formBarangPemindahan.mutasiStockdataGridView.Rows.Add(row1);
}
else if (inputBarangPopup !=null )
{
this.inputBarangPopup.setForm(row);
}
else if(modulPO != null)
{
row = new String[] { kodeStock, namaStock, satuan, hargaBeli };
this.modulPO.setItemDataGrid(row);
}
else if (modulPOS != null)
{
String hargaJual1 = stockDataGridView.Rows[stockDataGridView.CurrentCell.RowIndex].Cells[6].Value.ToString();
String hargaJual2 = stockDataGridView.Rows[stockDataGridView.CurrentCell.RowIndex].Cells[7].Value.ToString();
String hargaJual3 = stockDataGridView.Rows[stockDataGridView.CurrentCell.RowIndex].Cells[8].Value.ToString();
String jumlahStock = stockDataGridView.Rows[stockDataGridView.CurrentCell.RowIndex].Cells[3].Value.ToString();
String[] item = new String[] {kodeStock,namaStock,satuan,hargaJual1,hargaJual2,hargaJual3,jumlahStock};
modulPOS.setItem(item);
}
else if (modulPOSResepDokter != null)
{
String hargaJual1 = stockDataGridView.Rows[stockDataGridView.CurrentCell.RowIndex].Cells[6].Value.ToString();
String hargaJual2 = stockDataGridView.Rows[stockDataGridView.CurrentCell.RowIndex].Cells[7].Value.ToString();
String hargaJual3 = stockDataGridView.Rows[stockDataGridView.CurrentCell.RowIndex].Cells[8].Value.ToString();
String jumlahStock = stockDataGridView.Rows[stockDataGridView.CurrentCell.RowIndex].Cells[3].Value.ToString();
String[] item = new String[] { kodeStock, namaStock, satuan, hargaJual1, hargaJual2, hargaJual3, jumlahStock };
modulPOSResepDokter.setItem(item);
}
else if(modulSO != null)
{
DbObject dbo = new DbObject();
SqlDataReader sdr = dbo.get_single_data(new String[] { "saldo_akhir" }, "KodeStock", kodeStock, "view_saldo_stock_akhir");
while (sdr.Read())
{
row = new String[] { barcode, kodeStock, namaStock, ((double)sdr["saldo_akhir"]).ToString(),"0", satuan };
this.modulSO.setItemDataGrid(row);
}
}
close();
}
示例5: SimpanBtn_Click
private void SimpanBtn_Click(object sender, EventArgs e)
{
/* SubObj, kas/Utang */
string kodeSupplier = kodeSupplierTextBox.Text;
string noSJ = nomorFakturTextBox.Text;
SqlDataReader sdr = retBeli.InsertRow(DateTime.Today,kodeSupplier,noSJ,0,0,0,0); //RetBeli
string noBuktiRetur = "";
while(sdr.Read())
{
noBuktiRetur = (string)sdr["result"];
}
SqlDataReader sdr1 = ju.InsertRow(DateTime.Today, noBuktiRetur, "Retur Pembelian No.Bukti : " + noBuktiRetur); //JurnalUmum
string noBuktiJurnalUmum = "";
while (sdr1.Read())
{
noBuktiJurnalUmum = (string)sdr1["result"];
}
double subJurnalUmumGrandTotal = 0.0;
for (int i = 0; i < itemStockDataGridView.RowCount;i++ )
{
string kodeStock = itemStockDataGridView.Rows[i].Cells[0].Value.ToString();
double qtyRetur = 0;
if (itemStockDataGridView.Rows[i].Cells[4].Value != null)
{
qtyRetur = Convert.ToDouble(itemStockDataGridView.Rows[i].Cells[4].Value.ToString());
}
string satuan = itemStockDataGridView.Rows[i].Cells[3].Value.ToString();
double hargaBeli = Convert.ToDouble(itemStockDataGridView.Rows[i].Cells[5].Value.ToString());
double discPers = Convert.ToDouble(itemStockDataGridView.Rows[i].Cells[7].Value.ToString());
double ppnPers = Convert.ToDouble(itemStockDataGridView.Rows[i].Cells[9].Value.ToString());
double pembulatan = Convert.ToDouble(itemStockDataGridView.Rows[i].Cells[11].Value.ToString());
//double = Convert.ToDouble(itemStockDataGridView.Rows[i].Cells[5].Value.ToString());
if(qtyRetur > 0)
{
double subTotal = qtyRetur * hargaBeli;
double disc = subTotal * discPers/100;
double ppn = (subTotal - disc)*ppnPers/100;
double grandTotal = subTotal - disc + ppn;
retSubBeli.InsertRow(noBuktiRetur,(float)qtyRetur, satuan, kodeStock, (float)hargaBeli, (float)discPers, (float)disc, (float)subTotal, (float)grandTotal);//retsubbeli
//stock.UpdateJumlahTerjual(kodeStock, (float)qtyRetur, "-");//stock
subJurnalUmumGrandTotal += grandTotal;
}
}
if (subJurnalUmumGrandTotal == 0)
{
retBeli.DeleteRow(noBuktiRetur);
ju.DeleteRow(noBuktiJurnalUmum);
MessageBox.Show("Pencatatan Retur Gagal.");
}
else
{
sju.setKreditSystem(noBuktiJurnalUmum, "11311", "Persediaan Barang Dagang", (float)subJurnalUmumGrandTotal);
//kas atau piutang
if (statusPembelianComboBox.Text.ToLower().CompareTo("t") == 0)
{
sju.setDebitSystem(noBuktiJurnalUmum, "11111", "Kas Masuk Retur Pembelian : " + noBuktiRetur, (float)subJurnalUmumGrandTotal);
kas.InsertRowDebit(DateTime.Today, noBuktiRetur, "Kas Masuk Retur Pembelian : " + noBuktiRetur, (float)subJurnalUmumGrandTotal);
}
else
{
DbObject dbo = new DbObject();
SqlDataReader sdr2 = dbo.get_single_data(new string[] { "Saldo" }, "Faktur", noSJ, "View_Utang_all");
double saldoUtangFaktur = 0;
while (sdr2.Read())
{
saldoUtangFaktur = (double)sdr2["Saldo"];
}
if (saldoUtangFaktur == 0)
{
sju.setDebitSystem(noBuktiJurnalUmum, "11111", "Kas Masuk Retur Pembelian : " + noBuktiRetur, (float)subJurnalUmumGrandTotal);
kas.InsertRowDebit(DateTime.Today, noBuktiRetur, "Kas Masuk Retur Pembelian : " + noBuktiRetur, (float)subJurnalUmumGrandTotal);
}
else
{
sju.setDebitSystem(noBuktiJurnalUmum, "21111", "Utang Usaha", (float)subJurnalUmumGrandTotal);
utang.InsertRowDebit(DateTime.Today, noBuktiRetur, kodeSupplier, (float)(subJurnalUmumGrandTotal * -1), 0, DateTime.Today, "Retur Pembelian", tglTransaksiDateTimePicker.Value);
}
}
MessageBox.Show("Pencatatan Retur Berhasil.");
print_laporan(noBuktiRetur);
refreshDataGrid();
tabControl1.SelectedIndex = 2;
}
}