Exemplo n.º 1
0
 /// <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)
     {
         formMDI.infoError.ErrorString = "MSR3:" + ex.Message;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Function to fill Cash/Party combobox
 /// </summary>
 public void CashOrPartyComboFill()
 {
     try
     {
         TransactionsGeneralFill TransactionGeneralFillObj = new TransactionsGeneralFill();
         TransactionGeneralFillObj.CashOrPartyUnderSundryDrComboFill(cmbCashOrParty, true);
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "DNREG1:" + ex.Message;
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Function to fill Accountledger combobox
 /// </summary>
 private void AccountLedgerComboFill()
 {
     try
     {
         TransactionsGeneralFill TransactionsGeneralFillObj = new TransactionsGeneralFill();
         TransactionsGeneralFillObj.CashOrPartyComboFill(cmbAccountLedger, true);
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "ODPO:1" + ex.Message;
     }
 }
Exemplo n.º 4
0
        public void VoucherTypeComboFill()
        {
            TransactionsGeneralFill transactionGeneralFillObj = new TransactionsGeneralFill();

            try
            {
                transactionGeneralFillObj.VoucherTypeComboFill(cmbVoucherType, "Rejection In", true);
            }
            catch (Exception ex)
            {
                formMDI.infoError.ErrorString = "RIREG3:" + ex.Message;
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// Function to fill Salesman combobox
        /// </summary>
        public void salesmancombofill()
        {
            TransactionsGeneralFill transactionGeneralFillObj = new TransactionsGeneralFill();

            try
            {
                transactionGeneralFillObj.SalesmanViewAllForComboFill(cmbSalesMan, true);
            }
            catch (Exception ex)
            {
                formMDI.infoError.ErrorString = "RIReport3:" + ex.Message;
            }
        }
Exemplo n.º 6
0
 /// <summary>
 ///  Function to fill Cash Or Party combobox
 /// </summary>
 public void CashOrPartyComboFill()
 {
     try
     {
         TransactionsGeneralFill TransactionGeneralFillObj = new TransactionsGeneralFill();
         isDontExecuteCashorParty = true;
         TransactionGeneralFillObj.CashOrPartyComboFill(cmbCashOrParty, true);
         isDontExecuteCashorParty = false;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "MRREP3:" + ex.Message;
     }
 }
Exemplo n.º 7
0
 /// <summary>
 /// BankAccount Combobox fill function
 /// </summary>
 public void bankAccountComboFill()
 {
     try
     {
         DataTable               dtbl            = new DataTable();
         AccountLedgerSP         spAccountLedger = new AccountLedgerSP();
         TransactionsGeneralFill obj             = new TransactionsGeneralFill();
         dtbl = obj.BankComboFill();
         cmbBankAccount.DataSource    = dtbl;
         cmbBankAccount.ValueMember   = "ledgerId";
         cmbBankAccount.DisplayMember = "ledgerName";
         cmbBankAccount.SelectedIndex = -1;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "BR2:" + ex.Message;
     }
 }
Exemplo n.º 8
0
 /// <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)
     {
         formMDI.infoError.ErrorString = "MSR4:" + ex.Message;
     }
 }
Exemplo n.º 9
0
 /// <summary>
 /// Function to fill Cash/Bank combobox
 /// </summary>
 public void LedgerComboFill()
 {
     try
     {
         DataTable dtbl = new DataTable();
         TransactionsGeneralFill obj = new TransactionsGeneralFill();
         dtbl = obj.BankOrCashComboFill(false);
         DataRow dr = dtbl.NewRow();
         dr[0] = "All";
         dr[1] = 0;
         dtbl.Rows.InsertAt(dr, 0);
         cmbAccountLedger.DataSource    = dtbl;
         cmbAccountLedger.DisplayMember = "ledgerName";
         cmbAccountLedger.ValueMember   = "ledgerId";
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PREG2:" + ex.Message;
     }
 }
Exemplo n.º 10
0
 /// <summary>
 /// Function to fill AccountLedger combobox
 /// </summary>
 public void AccountLedgerComboFill()
 {
     try
     {
         DataTable dtbl = new DataTable();
         TransactionsGeneralFill obj = new TransactionsGeneralFill();
         dtbl = obj.AccountLedgerComboFill();
         DataRow dr = dtbl.NewRow();
         dr[0] = 0;
         dr[2] = "All";
         dtbl.Rows.InsertAt(dr, 0);
         cmbLedger.DataSource    = dtbl;
         cmbLedger.ValueMember   = "ledgerId";
         cmbLedger.DisplayMember = "ledgerName";
         cmbLedger.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "RRP3:" + ex.Message;
     }
 }
Exemplo n.º 11
0
 /// <summary>
 /// Function to fill Cash Or Bank combobox
 /// </summary>
 public void CashOrBankComboFill()
 {
     try
     {
         DataTable dtbl = new DataTable();
         TransactionsGeneralFill Obj = new TransactionsGeneralFill();
         dtbl = Obj.BankOrCashComboFill(false);
         DataRow dr = dtbl.NewRow();
         dr[1] = 0;
         dr[0] = "All";
         dtbl.Rows.InsertAt(dr, 0);
         cmbCashOrBank.DataSource    = dtbl;
         cmbCashOrBank.ValueMember   = "ledgerId";
         cmbCashOrBank.DisplayMember = "ledgerName";
         cmbCashOrBank.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "RRP2:" + ex.Message;
     }
 }
Exemplo n.º 12
0
 /// <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);
         ProductSP spProduct = new ProductSP();
         TransactionsGeneralFill trstGnFill = new TransactionsGeneralFill();
         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 = spProduct.ProductUnit(Convert.ToDecimal(dgvProductBOM.Rows[e.RowIndex].Cells[1].Value));
                     DataTable dtblunitconversionViewAll = new DataTable();
                     decimal   decProductId = Convert.ToDecimal(dgvProductBOM.Rows[e.RowIndex].Cells["dgvcmbRawMaterial"].Value);
                     dtblunitconversionViewAll = trstGnFill.UnitViewAllByProductId(dgvProductBOM, decProductId.ToString(), e.RowIndex);
                     DataRow drow = dtblunitconversionViewAll.NewRow();
                     drow["unitName"] = string.Empty;
                     drow["unitId"]   = 0;
                     dtblunitconversionViewAll.Rows.InsertAt(drow, 0);
                     DataGridViewComboBoxCell cell = (DataGridViewComboBoxCell)(dgvProductBOM.Rows[e.RowIndex].Cells["dgvcmbUnit"]);
                     cell.DataSource    = dtblunitconversionViewAll;
                     cell.ValueMember   = "unitId";
                     cell.DisplayMember = "unitName";
                     if (dtblunitconversionViewAll.Rows[0][4] != null && dtblunitconversionViewAll.Rows[0][4] != DBNull.Value)
                     {
                         dgvProductBOM.Rows[e.RowIndex].Cells["dgvcmbUnit"].Value = Convert.ToDecimal(dtblunitconversionViewAll.Rows[0][4].ToString());
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PB:21" + ex.Message;
     }
 }