コード例 #1
0
        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;
            }
        }
コード例 #2
0
        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;
        }
コード例 #3
0
        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";
                    }

                }
            }
        }
コード例 #4
0
 public Modul_Customer_PopUp(Modul_POS pos)
 {
     InitializeComponent();
     this.KeyPreview = true;
     this.pos = pos;
 }
コード例 #5
0
 public Modul_Barang_CariPopup(Modul_POS modulPOS)
 {
     InitializeComponent();
     this.KeyPreview = true;
     this.modulPOS = modulPOS;
 }
コード例 #6
0
 public void setModulObatBebas(Modul_POS posModul)
 {
     this.posModul = posModul;
 }