示例#1
0
 private void ClearForm()
 {
     BiayaIDText.Clear();
     TglText.Value = DateTime.Now;
     JamText.Text  = DateTime.Now.ToString("HH:mm_ss");
     PihakKeduaCombo.SelectedIndex = -1;
     JenisKasCombo.SelectedIndex   = -1;
     KeteranganText.Clear();
     NilIText.Value = 0;
 }
示例#2
0
 private void ClearDetilBrg()
 {
     // kosongkan tampilan jika berhasil
     BrgIDText.Clear();
     BrgNameText.Clear();
     KeteranganText.Clear();
     LoadJenisBrgCombo();
     LoadColorCombo();
     LoadMerkCombo();
     LoadKemasanComboBox();
 }
示例#3
0
 private void ClearForm()
 {
     BukuKasIDTextBox.Clear();
     TglBukuTextBox.Value       = DateTime.Now;
     JamBukuTextBox.Text        = DateTime.Now.ToString("HH:mm:ss");
     JenisTrsCombo.SelectedItem = null;
     PihakKetigaText.Clear();
     PihakKetigaNameText.Clear();
     ReffIDText.Clear();
     KeteranganText.Clear();
     NilaiText.Value = 0;
 }
示例#4
0
 private void ClearForm()
 {
     BiayaIDText.Clear();
     TglText.Value = DateTime.Now;
     JamText.Text  = DateTime.Now.ToString("HH:mm:ss");
     PihakKeduaCombo.SelectedIndex = -1;
     JenisBayarCombo.SelectedIndex = -1;
     KeteranganText.Clear();
     NilIText.Value = 0;
     _listBrg       = null;
     ErrorProvider1.Clear();
 }
示例#5
0
 private void ClearForm()
 {
     LunasKasBonIDText.Clear();
     TglText.Value = DateTime.Now;
     JamText.Text  = DateTime.Now.ToString("HH:mm:ss");
     KasBonIDText.Clear();
     PihakKeduaIDText.Clear();
     PihakKeduaNameText.Clear();
     KeteranganText.Clear();
     NilaiSisaPiutangText.Value = 0;
     ListLunasTable.Rows.Clear();
     AddRow();
     NilaiTotLunasText.Value = 0;
 }
示例#6
0
        private void SaveButton_Click(object sender, EventArgs e)
        {
            //  cek inputan combobox
            var subJenisID = SubJenisBrgComboBox.SelectedValue ?? "";
            var merkID     = MerkComboBox.SelectedValue ?? "";
            var colorID    = ColorComboBox.SelectedValue ?? "";
            var kemasan    = KemasanComboBox.Text;
            var brg        = new BrgModel
            {
                BrgID         = BrgIDText.Text,
                BrgName       = BrgNameText.Text,
                Keterangan    = KeteranganText.Text,
                ColorID       = colorID.ToString(),
                SubJenisBrgID = subJenisID.ToString(),
                MerkID        = merkID.ToString(),
                Kemasan       = kemasan,
                BrgNamePrint  = String.Concat(BrgNameText.Text, 27),
                IsAktif       = AktifCheckBox.Checked
            };

            try
            {
                var result = _brgBL.Save(brg);
            }
            catch (Exception x)
            {
                MessageBox.Show(x.Message);
                return;
            }

            // kosongkan tampilan jika berhasil
            BrgIDText.Clear();
            BrgNameText.Clear();
            KeteranganText.Clear();
            LoadJenisBrgCombo();
            LoadColorCombo();
            LoadMerkCombo();
            LoadKemasanComboBox();
        }
示例#7
0
        private void ClearForm()
        {
            NoTrsTextBox.Clear();
            TanggalDateTime.Value         = DateTime.Now;
            CustomerComboBox.SelectedItem = null;
            BuyerNameTextBox.Clear();
            AlamatTextBox.Clear();
            NoTelpTextBox.Clear();
            CatatanTextBox.Clear();
            DetilPenjualanTable.Rows.Clear();

            if (_listBayarDetil.IsNotNull())
            {
                _listBayarDetil.Clear();
            }

            BiayaKirimNumText.Value   = 0;
            DiskonNumText.Value       = 0;
            BiayaLainNumText.Value    = 0;
            BayarCashNumText.Value    = 0;
            BayarNonCashNumText.Value = 0;
            KembaliNumText.Value      = 0;

            ReCalcTotal();
            JamTrsTimer.Enabled = true;
            DetilPenjualanTable.Rows.Clear();
            _listBayarDetil = null;

            DepositIDText.Clear();
            PihakKeduaNameText.Clear();
            KeteranganText.Clear();
            NilaiDepositText.Value  = 0;
            TglDepositText.Value    = DateTime.Now;
            JamDepositText.Text     = "00:00:00";
            DepositCheckBox.Checked = false;

            AddRow();
        }
示例#8
0
        void LoadDataBrg(string brgID)
        {
            var brg = _brgBL.GetData(brgID);

            BrgIDText.Text = brgID;
            if (brg == null)
            {
                BrgNameText.Clear();
                KeteranganText.Clear();
                LoadJenisBrgCombo();
                LoadColorCombo();
                LoadMerkCombo();
                LoadKemasanComboBox();
            }
            else
            {
                BrgNameText.Text    = brg.BrgName;
                KeteranganText.Text = brg.Keterangan;
                var subJenisBrg = _subJenisBrgBL.GetData(brg.SubJenisBrgID);
                if (subJenisBrg != null)
                {
                    JenisBrgComboBox.SelectedValue = subJenisBrg.JenisBrgID;
                }
                else
                {
                    JenisBrgComboBox.SelectedValue = "";
                }

                LoadSubJenisBrgCombo();
                SubJenisBrgComboBox.SelectedValue = brg.SubJenisBrgID;

                MerkComboBox.SelectedValue  = brg.MerkID;
                ColorComboBox.SelectedValue = brg.ColorID;
                KemasanComboBox.Text        = brg.Kemasan;
                AktifCheckBox.Checked       = brg.IsAktif;
            }
        }