/// <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(); TransactionsGeneralFillBll obj = new TransactionsGeneralFillBll(); obj.CashOrBankComboFill(cmbCashBankAC, false); cmbCashBankAC.SelectedIndex = -1; GridFill(); } catch (Exception ex) { MessageBox.Show("MSR3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill Accountledger combobox /// </summary> private void AccountLedgerComboFill() { try { TransactionsGeneralFillBll TransactionsGeneralFillObj = new TransactionsGeneralFillBll(); TransactionsGeneralFillObj.CashOrPartyComboFill(cmbAccountLedger, true); } catch (Exception ex) { MessageBox.Show("ODPO:1" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill Cash/Party combobox /// </summary> public void CashOrPartyComboFill() { try { TransactionsGeneralFillBll TransactionGeneralFillObj = new TransactionsGeneralFillBll(); TransactionGeneralFillObj.CashOrPartyUnderSundryDrComboFill(cmbCashOrParty, true); } catch (Exception ex) { MessageBox.Show("DNREG01" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill Salesman combobox /// </summary> public void salesmancombofill() { TransactionsGeneralFillBll transactionGeneralFillObj = new TransactionsGeneralFillBll(); try { transactionGeneralFillObj.SalesmanViewAllForComboFill(cmbSalesMan, true); } catch (Exception ex) { MessageBox.Show("RIReport:03" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public void VoucherTypeComboFill() { TransactionsGeneralFillBll transactionGeneralFillObj = new TransactionsGeneralFillBll(); try { transactionGeneralFillObj.VoucherTypeComboFill(cmbVoucherType, "Rejection In", true); } catch (Exception ex) { MessageBox.Show("RIRgstr:03" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill Cash Or Party combobox /// </summary> public void CashOrPartyComboFill() { try { TransactionsGeneralFillBll TransactionGeneralFillObj = new TransactionsGeneralFillBll(); isDontExecuteCashorParty = true; TransactionGeneralFillObj.CashOrPartyComboFill(cmbCashOrParty, true); isDontExecuteCashorParty = false; } catch (Exception ex) { MessageBox.Show("MRR3:" + 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; TransactionsGeneralFillBll obj = new TransactionsGeneralFillBll(); 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); } }
/// <summary> /// BankAccount Combobox fill function /// </summary> public void bankAccountComboFill() { try { List <DataTable> listObj = new List <DataTable>(); AccountLedgerBll bllAccountLedger = new AccountLedgerBll(); TransactionsGeneralFillBll obj = new TransactionsGeneralFillBll(); listObj = obj.BankComboFill(); cmbBankAccount.DataSource = listObj[0]; cmbBankAccount.ValueMember = "ledgerId"; cmbBankAccount.DisplayMember = "ledgerName"; cmbBankAccount.SelectedIndex = -1; } catch (Exception ex) { MessageBox.Show("BR:2" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill AccountyLedger combobox /// </summary> public void LedgerComboFill() { try { List <DataTable> ListObj = new List <DataTable>(); TransactionsGeneralFillBll obj = new TransactionsGeneralFillBll(); ListObj = obj.AccountLedgerComboFill(); DataRow dr = ListObj[0].NewRow(); dr[0] = 0; dr[2] = "All"; ListObj[0].Rows.InsertAt(dr, 0); cmbAccountLedger.DataSource = ListObj[0]; cmbAccountLedger.DisplayMember = "ledgerName"; cmbAccountLedger.ValueMember = "ledgerId"; } catch (Exception ex) { MessageBox.Show("RR2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill Bank/Cash combobox /// </summary> public void BankOrCashComboFill() { try { List <DataTable> listObj = new List <DataTable>(); TransactionsGeneralFillBll Obj = new TransactionsGeneralFillBll(); listObj = Obj.BankOrCashComboFill(false); DataRow dr = listObj[0].NewRow(); dr[1] = 0; dr[0] = "All"; listObj[0].Rows.InsertAt(dr, 0); cmbBankOrCash.DataSource = listObj[0]; cmbBankOrCash.ValueMember = "ledgerId"; cmbBankOrCash.DisplayMember = "ledgerName"; cmbBankOrCash.SelectedIndex = 0; } catch (Exception ex) { MessageBox.Show("CR:1" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// grid CellValueChanged for do the basic calculation and unit selection /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgvProductBOM_CellValueChanged(object sender, DataGridViewCellEventArgs e) { try { CheckInvalidEntries(e); ProductCreationBll BllProductCreation = new ProductCreationBll(); TransactionsGeneralFillBll trstGnFill = new TransactionsGeneralFillBll(); if (e.RowIndex > -1) { if (e.ColumnIndex == dgvProductBOM.Columns["dgvcmbRawMaterial"].Index) { if (dgvProductBOM.Rows[e.RowIndex].Cells["dgvcmbRawMaterial"] != null) { dgvProductBOM.Rows[e.RowIndex].Cells["dgvtxtUnit"].Value = BllProductCreation.ProductUnit(Convert.ToDecimal(dgvProductBOM.Rows[e.RowIndex].Cells[1].Value)); List<DataTable> listObj = new List<DataTable>(); decimal decProductId = Convert.ToDecimal(dgvProductBOM.Rows[e.RowIndex].Cells["dgvcmbRawMaterial"].Value); listObj = trstGnFill.UnitViewAllByProductId(dgvProductBOM, decProductId.ToString(), e.RowIndex); DataRow drow = listObj[0].NewRow(); drow["unitName"] = string.Empty; drow["unitId"] = 0; listObj[0].Rows.InsertAt(drow, 0); DataGridViewComboBoxCell cell = (DataGridViewComboBoxCell)(dgvProductBOM.Rows[e.RowIndex].Cells["dgvcmbUnit"]); cell.DataSource = listObj[0]; cell.ValueMember = "unitId"; cell.DisplayMember = "unitName"; if (listObj[0].Rows[0][4] != null && listObj[0].Rows[0][4] != DBNull.Value) { dgvProductBOM.Rows[e.RowIndex].Cells["dgvcmbUnit"].Value = Convert.ToDecimal(listObj[0].Rows[0][4].ToString()); } } } } } catch (Exception ex) { MessageBox.Show("PB:21" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }