示例#1
0
 private void ReturDepositIDText_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F1)
     {
         SearchKodeTrs();
         TglText.Focus();
     }
 }
示例#2
0
        private void Save()
        {
            ErrorProvider1.Clear();
            if (PihakKeduaCombo.SelectedValue == null)
            {
                ErrorProvider1.SetError(LabelPihakKedua, "Pilih Pihak Kedua");
                return;
            }
            if (JenisBayarCombo.SelectedValue == null)
            {
                ErrorProvider1.SetError(JenisBayarLabel, "Pilih Jenis Bayar");
                return;
            }
            if (BuyerNameTextBox.Text == "")
            {
                ErrorProvider1.SetError(BuyerNameLabel, "Isi Contact Person Customer");
                return;
            }

            var deposit = new DepositModel
            {
                DepositID    = BiayaIDText.Text,
                Tgl          = TglText.Value.ToString("dd-MM-yyyy"),
                Jam          = JamText.Text,
                PihakKeduaID = PihakKeduaCombo.SelectedValue.ToString(),
                BuyerName    = BuyerNameTextBox.Text,
                JenisBayarID = JenisBayarCombo.SelectedValue.ToString(),
                Keterangan   = KeteranganText.Text,
                NilaiDeposit = NilIText.Value,
                ListBrg      = _listBrg
            };

            using (var trans = TransHelper.NewScope())
            {
                var result = _depositBL.Save(deposit);
                _bpKasBL.Generate(result);
                _bpHutangBL.GenHutang(result);
                trans.Complete();
            }
            ClearForm();
            TglText.Focus();
        }
示例#3
0
 private void SaveButton_Click(object sender, EventArgs e)
 {
     Save();
     ClearForm();
     TglText.Focus();
 }
示例#4
0
 private void SearchButton_Click(object sender, EventArgs e)
 {
     SearchKodeTrs();
     ShowData();
     TglText.Focus();
 }
示例#5
0
 private void ReturDepositIDText_Validated(object sender, EventArgs e)
 {
     ShowData();
     TglText.Focus();
 }
示例#6
0
 private void KasBonIDText_Validated(object sender, EventArgs e)
 {
     ShowData();
     TglText.Focus();
 }