public Chooser(Login login,string level) { InitializeComponent(); this.login = login; posObatBebas = new Modul_POS(this.login); posResepDokter = new Modul_POS_Resep_Dokter(this.login); posObatBebas.setModulResepDokter(posResepDokter); posResepDokter.setModulObatBebas(posObatBebas); if (level.CompareTo("1") == 0) { posObatBebasBtn.Visible = true; //posResepBtn.Visible = true; integratedBtn.Visible = true; this.Visible = true; } else { this.Visible = false; posObatBebas.Show(); //posObatBebasBtn.Visible = true; //integratedBtn.Visible = false; } }
public Modul_POS(Login login) { InitializeComponent(); this.KeyPreview = true; allfunc = new AllFunc(); dbo = new DbObject(); Clock = new Timer(); Clock.Interval = 1000; Clock.Start(); Clock.Tick += new EventHandler(Timer_Tick); timeClockLbl.Text = GetTime(); dateLbl.Text = GetDate(); this.login = login; }
public Modul_Pembayaran(Modul_POS modulPos,Login login) { InitializeComponent(); this.modulPos = modulPos; allfunc = new AllFunc(); string[] custDataArr = modulPos.getCustomer(); if (custDataArr[0].CompareTo("") == 0) { kodePelangganTxt.Text = "TUNAI"; namaKodePelangganTxt.Text = "TUNAI"; namaPasienTxt.Text = "TUNAI"; alamatPasienTxt.Text = ""; alamatTxt.Text = ""; } else { kodePelangganTxt.Text = custDataArr[0]; namaKodePelangganTxt.Text = custDataArr[1]; namaPasienTxt.Text = custDataArr[1]; alamatPasienTxt.Text = custDataArr[2]; alamatTxt.Text = custDataArr[2]; } this.jumlahPenjualan = modulPos.jumlahPenjualan; this.jumlahDiskon = modulPos.jumlahDiskon; this.jumlahPenjualanBruto = modulPos.jumlahPenjualanBruto; nettoTxt.Text = allfunc.digit_separated(Convert.ToString(this.jumlahPenjualan)); discountRPTxt.Text = allfunc.digit_separated(Convert.ToString(modulPos.jumlahDiskon)); dbo = new DbObject(); kas = new Kas(); obj = new JurnalUmum(); subObj = new SubJurnalUmum(); piutang = new Piutang(); stock = new Stock(); stockGudang = new StockGudang(); noBon = new NoBon(); jual = new Jual(); subjual = new SubJual(); returJual = new RetJual(); returSubJual = new RetSubJual(); racikan = new Racikan(); jasa = new Jasa(); this.login = login; label15.Visible = false; kasir = login.username; }
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) { while (sdr4.Read()) { if (sdr4["TotalOmset"] != DBNull.Value) { totalOmsetTxt.Text = allfunc.digit_separated(Convert.ToString((double)sdr4["TotalOmset"])); } else { totalOmsetTxt.Text = "0"; } } } }
public MainForm(Login login) { InitializeComponent(); this.login = login; }
private void itemPenjualanDataGridView_CellClick(object sender, DataGridViewCellEventArgs e) { if (((e.ColumnIndex == 5) || (e.ColumnIndex == 4)) && (e.RowIndex >= 0) && (e.ColumnIndex >= 0)) { itemPenjualanDataGridView.Rows[itemPenjualanDataGridView.CurrentCell.RowIndex].Cells[4].ReadOnly = true; itemPenjualanDataGridView.Rows[itemPenjualanDataGridView.CurrentCell.RowIndex].Cells[5].ReadOnly = true; if (itemPenjualanDataGridView.Rows[itemPenjualanDataGridView.CurrentCell.RowIndex].Cells[itemPenjualanDataGridView.CurrentCell.ColumnIndex].ReadOnly) { if ((itemPenjualanDataGridView.Rows[itemPenjualanDataGridView.CurrentCell.RowIndex].Cells[1].Value.ToString().ToLower().Contains("jasa")) && (itemPenjualanDataGridView.Rows[itemPenjualanDataGridView.CurrentCell.RowIndex].Cells[1].Value.ToString().ToLower().Contains("lain")) && (itemPenjualanDataGridView.CurrentCell.ColumnIndex == 4)) { itemPenjualanDataGridView.Rows[itemPenjualanDataGridView.CurrentCell.RowIndex].Cells[itemPenjualanDataGridView.CurrentCell.ColumnIndex].ReadOnly = false; } else if (((itemPenjualanDataGridView.Rows[itemPenjualanDataGridView.CurrentCell.RowIndex].Cells[1].Value.ToString().ToLower().Contains("jasa")) && (itemPenjualanDataGridView.Rows[itemPenjualanDataGridView.CurrentCell.RowIndex].Cells[1].Value.ToString().ToLower().Contains("lain")) || (itemPenjualanDataGridView.Rows[itemPenjualanDataGridView.CurrentCell.RowIndex].Cells[1].Value.ToString().ToLower().Contains("jasa")) && (itemPenjualanDataGridView.Rows[itemPenjualanDataGridView.CurrentCell.RowIndex].Cells[1].Value.ToString().ToLower().Contains("rawat"))) && (itemPenjualanDataGridView.CurrentCell.ColumnIndex == 4)) { itemPenjualanDataGridView.Rows[itemPenjualanDataGridView.CurrentCell.RowIndex].Cells[4].ReadOnly = false; } else if (((itemPenjualanDataGridView.Rows[itemPenjualanDataGridView.CurrentCell.RowIndex].Cells[1].Value.ToString().ToLower().Contains("jasa")) && (!itemPenjualanDataGridView.Rows[itemPenjualanDataGridView.CurrentCell.RowIndex].Cells[1].Value.ToString().ToLower().Contains("lain"))) && (itemPenjualanDataGridView.CurrentCell.ColumnIndex == 4)) { } else { Login logPermission = new Login(true, itemPenjualanDataGridView); logPermission.Show(); } } else { itemPenjualanDataGridView.Rows[itemPenjualanDataGridView.CurrentCell.RowIndex].Cells[itemPenjualanDataGridView.CurrentCell.ColumnIndex].Value = allfunc.remove_separated(itemPenjualanDataGridView.Rows[itemPenjualanDataGridView.CurrentCell.RowIndex].Cells[itemPenjualanDataGridView.CurrentCell.ColumnIndex].Value.ToString()); } } }