示例#1
0
 private void Cancel_Click(object sender, RoutedEventArgs e)
 {
     this.ClearForm();
     AccountData.AccountData v = new AccountData.AccountData();
     Switcher.Switchimport(v);
 }
示例#2
0
 private void Accountlvlsetting_click(object sender, RoutedEventArgs e)
 {
     AccountData.AccountData v = new AccountData.AccountData();
     Switcher.Switchimport(v);
 }
示例#3
0
        private void Save_Click(object sender, RoutedEventArgs e)
        {
            if (this.DataMataUangSelected != null)
            {
                using (var uow = new UnitOfWork(AppConfig.Current.ContextName))
                {
                    var oDBData = uow.DefaultAkunMataUang.Get(this.DataMataUangSelected.IdDefaultMataUang.GetValueOrDefault(0));
                    if (oDBData != null)
                    {
                        if (cbAccountReceivable.SelectedItem != null)
                        {
                            oDBData.IdPiutangUsaha = Convert.ToInt32(cbAccountReceivable.SelectedValue);
                        }
                        if (cbAccountPayable.SelectedItem != null)
                        {
                            oDBData.IdHutangUsaha = Convert.ToInt32(cbAccountPayable.SelectedValue);
                        }
                        if (cbBankpayment.SelectedItem != null)
                        {
                            oDBData.IdPembayaranBank = Convert.ToInt32(cbBankpayment.SelectedValue);
                        }
                        if (cbCashpayment.SelectedItem != null)
                        {
                            oDBData.IdPembayaranTunai = Convert.ToInt32(cbCashpayment.SelectedValue);
                        }
                        if (cbPurchasedownpayment.SelectedItem != null)
                        {
                            oDBData.IdUangMukaPembelian = Convert.ToInt32(cbPurchasedownpayment.SelectedValue);
                        }
                        if (cbSalesdownpayment.SelectedItem != null)
                        {
                            oDBData.IdUangMukaPenjualan = Convert.ToInt32(cbSalesdownpayment.SelectedValue);
                        }
                        if (cbReceivedpostdatecheque.SelectedItem != null)
                        {
                            oDBData.IdPiutangGiro = Convert.ToInt32(cbReceivedpostdatecheque.SelectedValue);
                        }
                        if (cbPostdatecheque.SelectedItem != null)
                        {
                            oDBData.IdHutangGiro = Convert.ToInt32(cbPostdatecheque.SelectedValue);
                        }
                        uow.DefaultAkunMataUang.Update(oDBData);
                        uow.Save();

                        MessageBox.Show("Important Account Currency berhasil diupdate ! \n");
                    }
                }
            }

            if (this.DataPajakSelected != null)
            {
                if (cbAccountBuy.SelectedItem != null)
                {
                    this.DataPajakSelected.IdAkunBeli = Convert.ToInt32(cbAccountBuy.SelectedValue);
                }
                if (cbSellAccount.SelectedItem != null)
                {
                    this.DataPajakSelected.IdAkunJual = Convert.ToInt32(cbSellAccount.SelectedValue);
                }

                DataPajakBLL DataPajakBLL = new DataPajakBLL();
                if (DataPajakBLL.EditPajak(this.DataPajakSelected) == true)
                {
                    MessageBox.Show("Important Account Tax berhasil diupdate ! \n");
                }
            }

            if (this.KelompokHartaTetapSelected != null)
            {
                if (cbAssetaccount.SelectedItem != null)
                {
                    this.KelompokHartaTetapSelected.IdAkunAsset = Convert.ToInt32(cbAssetaccount.SelectedValue);
                }
                if (cbAkumulasiAccounDept.SelectedItem != null)
                {
                    this.KelompokHartaTetapSelected.IdAkunAkumulasiPenyusutan = Convert.ToInt32(cbAkumulasiAccounDept.SelectedValue);
                }
                if (cbDeprectiation.SelectedItem != null)
                {
                    this.KelompokHartaTetapSelected.IdAkunPenyusutan = Convert.ToInt32(cbDeprectiation.SelectedValue);
                }

                KelompokHartaTetapBLL KelompokHartaTetapBLL = new KelompokHartaTetapBLL();
                if (KelompokHartaTetapBLL.EditKelompokHartaTetap(this.KelompokHartaTetapSelected) == true)
                {
                    MessageBox.Show("Important Account Fixed Asset Category berhasil diupdate ! \n");
                }
            }

            this.ClearForm();
            AccountData.AccountData v = new AccountData.AccountData();
            Switcher.Switchimport(v);
        }