//void _fm_OnSavedTenantReceipt(object sender, MuwaEstates.SavedTenantReceiptEventArgs e) //{ // var _val = MuwaEstates.fnn.DeleteTenantReceipt(e.Receipt.receipt_id); //} void m_Timer_Tick(object sender, EventArgs e) { m_Timer.Stop(); if (auto_backup_count > 3) { return; }//tried three times in thirty minutes and failed m_process = _process.perform_auto_backup; backworker1.RunWorkerAsync(); }
private void BankMaker_Load(object sender, EventArgs e) { this.BackColor = Color.WhiteSmoke; CenterToScreen(); m_sabbath = this.Tag as fs_class; if (m_sabbath == null) { this.Close(); return; } InitIgridColumns(); datam.ShowWaitForm(); Application.DoEvents(); datam.SecurityCheck(); m_DataEntrants = new List <int>(); m_process = _process.form_loading; backworker.RunWorkerAsync(); }
private void buttonsave_Click(object sender, EventArgs e) { MessageBox.Show("This Feature Is Currently Disabled On Your System"); return; string _str = null; _str = "Are You Sure You Want To Send This Message ??"; if (!dbm.WarningMessage(_str, "Send SMS Warning")) { return; } textBoxMsg.Enabled = false; textBoxSender.Enabled = false; buttonsave.Enabled = false; m_process = _process.send_sms; // m_process = _process.test_mode; loadingCircle1.Active = true; loadingCircle1.Visible = true; m_PhoneString = null; m_HEADER = textBoxSender.Text.Trim(); m_MESSAGE = textBoxMsg.Text.Trim(); backworker.RunWorkerAsync(); }
private void buttonX1_Click(object sender, EventArgs e) { fGrid.CommitEditCurCell(); var _check = new string[] { "start_date", "bank", "exp_account", "amount", }; bool _roll_back = false; foreach (var k in _check) { if (fGrid.Rows[k].Cells[1].Value == null) { MessageBox.Show("Important Field Left Blank", k); fGrid.Focus(); fGrid.SetCurCell(k, 1); return; } } string _str = "Are You Sure You Want To Save This Record ??"; if (!dbm.WarningMessage(_str, "Save Warning")) { return; } buttoncreate.Enabled = false; buttoncancel.Enabled = false; fGrid.ReadOnly = true; ic.bank_reconc_transC _trans = new ic.bank_reconc_transC(); ic.bank_reconc_accountC _account = (fGrid.Rows["exp_account"].Cells[1].AuxValue as fnn.iGComboItemEX).Tag as ic.bank_reconc_accountC; ic.bankAccountC _bank = (fGrid.Rows["bank"].Cells[1].AuxValue as fnn.iGComboItemEX).Tag as ic.bankAccountC; // _trans.amount = fGrid.Rows["amount"].Cells["desc"].Value.ToInt32(); _trans.fs_date = System.Convert.ToDateTime(fGrid.Rows["start_date"].Cells[1].AuxValue); _trans.fs_id = fn.GetFSID(_trans.fs_date); _trans.status = em.voucher_statusS.valid; _trans.m_partition_id = string.Format("{0}{1}", _trans.fs_date.Year, _trans.fs_date.Month).ToInt32(); _trans.br_acc_id = _account.br_acc_id; _trans.sys_account_id = _account.sys_account_id; _trans.bank_account_id = _bank.un_id; _trans.br_acc_type = _account.br_acc_type; // if (fGrid.Rows["desc"].Cells[1].Value != null) { _trans.desc = fGrid.Rows["desc"].Cells[1].Text; } using (var xd = new xing()) { #region Insert Master Payment // var _ts_id = accn.AccountsTransaction(xd, string.Format("Being Bank Reconciliation"), _trans.fs_date); _trans.trans_id = _ts_id; _trans.un_id = xd.SingleInsertCommandTSPInt("acc_bank_reconc_trans_tb", new string[] { "br_acc_id", "amount", "transaction_id", "fs_date", "fs_id", "m_partition_id", "status", "sys_account_id", "description", "br_acc_type_id", "fs_time_stamp", "lch_id", "bank_account_id", "pc_us_id" }, new object[] { _trans.br_acc_id, _trans.amount, _trans.trans_id, _trans.fs_date, _trans.fs_id, _trans.m_partition_id, _trans.status.ToInt16(), _trans.sys_account_id, _trans.desc, _trans.br_acc_type.ToInt16(), 0, sdata.ChurchID, _trans.bank_account_id, sdata.PC_US_ID }); #endregion switch (_account.br_acc_type) { case em.bank_reconc_typeS.addition: { // accn.JournalBook(xd, _trans.fs_date, em.j_sectionS.income, _ts_id, _account.sys_account_id, 0, 0); break; } case em.bank_reconc_typeS.deduction: { break; } } xd.CommitTransaction(); } fGrid.ReadOnly = false; ClearGrid(); m_process = _process.after_save; backworker.RunWorkerAsync(); }
private void buttoncreate_Click(object sender, EventArgs e) { if (fGrid.CurCell != null) { fGrid.CommitEditCurCell(); } if (!CanSave()) { return; } ic.foreign_exchange_convC _c = new ic.foreign_exchange_convC(); _c.curr_sys_exch_rate = fGrid.Rows["curr_exch_rate"].Cells[1].Value.ToFloat(); _c.curr_sys_amount = fGrid.Rows["curr_amount"].Cells[1].AuxValue.ToInt32(); _c.sys_account_id = (fGrid.Rows["currency"].Cells[1].AuxValue as fnn.iGComboItemEX).Tag.ToInt32(); _c.currency_id = datam.DATA_FOREIGN_CURRENCY.Values.Where(d => d.sys_account_id == _c.sys_account_id).FirstOrDefault().fr_currency_id; _c.fs_date = System.Convert.ToDateTime(fGrid.Rows["date"].Cells[1].Value); _c.fs_id = fn.GetFSID(_c.fs_date); _c.used_exch_rate = fGrid.Rows["exch_rate"].Cells[1].Value.ToFloat(); _c.exchanged_amount = fGrid.Rows["exch_amount"].Cells[1].Value.ToInt32(); _c.m_partition_id = string.Format("{0}{1}", _c.fs_date.Year, _c.fs_date.Month).ToInt32(); _c.pc_us_id = sdata.PC_US_ID; _c.status = em.foreign_exch_statusS.valid; // string _str = "Are You Sure You Want To Save This Record ??"; if (!dbm.WarningMessage(_str, "Save Warning")) { return; } using (var xd = new xing()) { var _ts_id = accn.AccountsTransaction(xd, string.Format("Foreign Exchange for {0}", datam.DATA_FOREIGN_CURRENCY[_c.currency_id].fr_currency_name), _c.fs_date); _c.un_id = xd.SingleInsertCommandTSPInt("acc_foreign_exchange_tb", new string[] { "fs_date", "fs_id", "currency_id", "sys_account_id", "curr_sys_exch_rate", "curr_sys_amount", "used_exch_rate", "exchanged_amount", "status", "m_partition_id", "pc_us_id", "fs_time_stamp", "lch_id", "transaction_id", "edate" }, new object[] { _c.fs_date, _c.fs_id, _c.currency_id, _c.sys_account_id, _c.curr_sys_exch_rate, _c.curr_sys_amount, _c.used_exch_rate, _c.exchanged_amount, _c.status.ToByte(), _c.m_partition_id, _c.pc_us_id, 0, datam.LCH_ID, _ts_id, sdata.CURR_DATE }); // int _val = _c.exch_loss == 0 ? (_c.exchanged_amount * _c.curr_sys_exch_rate).ToInt32() : _c.converted_ug_amount; accn.JournalBook(xd, _c.fs_date, em.j_sectionS.unbanked, _ts_id, accn.GetAccountByAlias("UNBANKED_CASH").account_id, _val, 0); accn.JournalBook(xd, _c.fs_date, em.j_sectionS.unbanked, _ts_id, _c.sys_account_id, 0, _val); // if (_c.exch_loss > 0) { accn.JournalBook(xd, _c.fs_date, em.j_sectionS.unbanked, _ts_id, _c.sys_account_id, 0, _c.exch_loss); accn.JournalBook(xd, _c.fs_date, em.j_sectionS.loss, _ts_id, accn.GetAccountByAlias("FOREIGN_EXCHANGE_LOSS").account_id, _c.exch_loss, 0); } if (_c.exch_gain > 0) { accn.JournalBook(xd, _c.fs_date, em.j_sectionS.unbanked, _ts_id, accn.GetAccountByAlias("UNBANKED_CASH").account_id, _c.exch_gain, 0); accn.JournalBook(xd, _c.fs_date, em.j_sectionS.income, _ts_id, accn.GetAccountByAlias("FOREIGN_EXCHANGE_GAIN").account_id, 0, _c.exch_gain); } accn.ForeignCurrencyMVT(xd, datam.DATA_FOREIGN_CURRENCY[_c.currency_id], 0, _c.exchanged_amount, _c.fs_date); // xd.SingleUpdateCommandALL("acc_foreign_currency_tb", new string[] { "last_exchange_date", "last_exchange_id", "fr_currency_id", "lch_id" }, new object[] { _c.fs_date, _c.un_id, _c.currency_id, datam.LCH_ID }, 2); // xd.CommitTransaction(); } m_process = _process.after_insert; backworker.RunWorkerAsync(); ClearGrid(); }
get => _mainWindow ?? new RemoteWindow(_process, MainWindowHandle);
public void CheckUpdates() { m_process = _process.check_updates; backworker.RunWorkerAsync(); }