/// <summary> /// Function to reset form /// </summary> public void Clear() { try { txtVoucherDateFrom.Text = PublicVariables._dtCurrentDate.ToString("dd-MMM-yyyy"); txtVoucherDateTo.Text = PublicVariables._dtCurrentDate.ToString("dd-MMM-yyyy"); dtpVoucherDateFrom.Value = PublicVariables._dtCurrentDate; dtpVoucherDateFrom.MinDate = PublicVariables._dtFromDate; dtpVoucherDateFrom.MaxDate = PublicVariables._dtToDate; dtpVoucherDateTo.Value = PublicVariables._dtCurrentDate; dtpVoucherDateTo.MinDate = PublicVariables._dtFromDate; dtpVoucherDateTo.MaxDate = PublicVariables._dtToDate; dtpSalaryMonth.Value = PublicVariables._dtCurrentDate; dtpSalaryMonth.MinDate = PublicVariables._dtFromDate; dtpSalaryMonth.MaxDate = PublicVariables._dtToDate; txtVoucherNo.Clear(); cmbVoucherTypeName.SelectedIndex = -1; VoucherTypeNameComboFill(); TransactionsGeneralFill obj = new TransactionsGeneralFill(); obj.CashOrBankComboFill(cmbCashBankAC, false); cmbCashBankAC.SelectedIndex = -1; GridFill(); } catch (Exception ex) { MessageBox.Show("MSR3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to call frmLedgerPopup form to select and view ledgers /// </summary> /// <param name="frmLedgerPopup"></param> /// <param name="decId"></param> public void CallFromLedgerPopup(frmLedgerPopup frmLedgerPopup, decimal decId) //PopUp { try { base.Show(); this.frmLedgerPopupObj = frmLedgerPopup; TransactionsGeneralFill obj = new TransactionsGeneralFill(); obj.CashOrBankComboFill(cmbCashBankAC, false); cmbCashBankAC.SelectedValue = decId; cmbCashBankAC.Focus(); frmLedgerPopupObj.Close(); frmLedgerPopupObj = null; } catch (Exception ex) { MessageBox.Show("MSR4:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }