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_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 Modul_Customer_PopUp(Modul_POS_Resep_Dokter posResep)
 {
     InitializeComponent();
     this.KeyPreview = true;
     this.posResep = posResep;
 }
        public Modul_Pembayaran(Modul_POS_Resep_Dokter modulPosResepDokter,Login login)
        {
            InitializeComponent();
            this.modulPosResepDokter = modulPosResepDokter;
            allfunc = new AllFunc();
            string[] custDataArr = modulPosResepDokter.getCustomer();
            string[] custDataArr2 = modulPosResepDokter.getCustomer2();
            string[] custDokterArr = modulPosResepDokter.getDokter();
            kodeDokterTxt.Text = custDokterArr[0];
            namaDokterTxt.Text = custDokterArr[1];
            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];
            }
            namaPasienTxt.Text = custDataArr2[0];
            umurPasienTxt.Text = custDataArr2[1];
            alamatPasienTxt.Text = custDataArr2[2];

            noResepTxt.Text = custDokterArr[2];
            this.jumlahPenjualan = modulPosResepDokter.jumlahPenjualan;
            this.jumlahDiskon = modulPosResepDokter.jumlahDiskon;
            this.jumlahPenjualanBruto = modulPosResepDokter.jumlahPenjualanBruto;
            nettoTxt.Text = allfunc.digit_separated(Convert.ToString(modulPosResepDokter.jumlahPenjualan));
            discountRPTxt.Text = allfunc.digit_separated(Convert.ToString(modulPosResepDokter.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 void setModulResepDokter(Modul_POS_Resep_Dokter resepDokter)
 {
     this.resepDokter = resepDokter;
 }
 public Modul_Barang_CariPopup(Modul_POS_Resep_Dokter modulPOSResepDokter)
 {
     InitializeComponent();
     this.KeyPreview = true;
     this.modulPOSResepDokter = modulPOSResepDokter;
 }
 public Modul_Data_Dokter_PopUp(Modul_POS_Resep_Dokter resepDokter)
 {
     InitializeComponent();
     this.KeyPreview = true;
     this.resepDokter = resepDokter;
 }