示例#1
0
        /// <summary>
        /// Function to fill currency combobox
        /// </summary>
        public void CurrencyComboFill()
        {
            SettingsSP spSettings = new SettingsSP();
            TransactionsGeneralFill TransactionGeneralFillObj = new TransactionsGeneralFill();
            DataTable dtbl = new DataTable();
            try
            {
                dtbl = TransactionGeneralFillObj.CurrencyComboByDate(dtpDate.Value);
                cmbCurrency.DataSource = dtbl;
                cmbCurrency.DisplayMember = "currencyName";
                cmbCurrency.ValueMember = "exchangeRateId";

                cmbCurrency.SelectedValue = 1m;
                if (spSettings.SettingsStatusCheck("MultiCurrency") == "Yes")
                {
                    cmbCurrency.Enabled = true;
                }
                else
                {
                    cmbCurrency.Enabled = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("SJ:51" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
示例#2
0
 /// <summary>
 /// Currency combo fill
 /// </summary>
 public void ComboCurrencyFill()
 {
     TransactionsGeneralFill transactionGeneralFillObj = new TransactionsGeneralFill();
     SettingsSP SpSettings = new SettingsSP();
     try
     {
         DataTable dtbl = new DataTable();
         dtbl = transactionGeneralFillObj.CurrencyComboByDate(Convert.ToDateTime(txtSalesQuotationDate.Text));
         cmbCurrency.DataSource = dtbl;
         cmbCurrency.DisplayMember = "currencyName";
         cmbCurrency.ValueMember = "exchangeRateId";
         cmbCurrency.SelectedValue = 1m;
         DataRow dr = dtbl.NewRow();
         if (SpSettings.SettingsStatusCheck("MultiCurrency") == "Yes")
         {
             cmbCurrency.Enabled = true;
         }
         else
         {
             cmbCurrency.Enabled = false;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SQ:13" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
示例#3
0
        /// <summary>
        /// Currency Combofill function
        /// </summary>
        public void GridCurrencyComboFill()
        {
            try
            {
                DataTable dtbl = new DataTable();
                TransactionsGeneralFill Obj = new TransactionsGeneralFill();
                dtbl = Obj.CurrencyComboByDate(Convert.ToDateTime(txtDate.Text));
                DataRow dr = dtbl.NewRow();
                dr["exchangeRateId"] = "0";
                dr["currencyName"] = string.Empty;
                dtbl.Rows.InsertAt(dr, 0);
                dgvcmbCurrency.DataSource = dtbl;
                dgvcmbCurrency.DisplayMember = "currencyName";
                dgvcmbCurrency.ValueMember = "exchangeRateId";
                SettingsSP spSettings = new SettingsSP();
                if (spSettings.SettingsStatusCheck("MultiCurrency") == "Yes")
                {
                    dgvcmbCurrency.ReadOnly = false;
                }
                else
                {
                    dgvcmbCurrency.ReadOnly = true;

                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("PV5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
示例#4
0
 /// <summary>
 /// Function to fill Currency combobox
 /// </summary>
 public void CurrencyComboFill()
 {
     TransactionsGeneralFill TransactionGeneralFillObj = new TransactionsGeneralFill();
     SettingsSP spSettings = new SettingsSP();
     DataTable dtbl = new DataTable();
     try
     {
         DateTime dtDate = Convert.ToDateTime(dtpDate.Value);
         DataTable dtblCurrency = new DataTable();
         dtblCurrency = TransactionGeneralFillObj.CurrencyComboByDate(dtDate);
         cmbCurrency.DataSource = dtblCurrency;
         cmbCurrency.DisplayMember = "currencyName";
         cmbCurrency.ValueMember = "exchangeRateId";
         cmbCurrency.Enabled = (spSettings.SettingsStatusCheck("MultiCurrency") == "Yes") ? true : false;
         cmbCurrency.SelectedValue = 1;
     }
     catch (Exception ex)
     {
         MessageBox.Show("PR:02" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
示例#5
0
 /// <summary>
 /// Function to fill the currency combobox
 /// </summary>
 public void CurrencyComboFill()
 {
     try
     {
         SettingsSP spSetting = new SettingsSP();
         DataTable dtblCurrency = new DataTable();
         DateTime dtDate = Convert.ToDateTime(dtpDate.Value);
         TransactionsGeneralFill TransactionGeneralFillObj = new TransactionsGeneralFill();
         dtblCurrency = TransactionGeneralFillObj.CurrencyComboByDate(dtDate);
         cmbCurrency.DataSource = dtblCurrency;
         cmbCurrency.DisplayMember = "currencyName";
         cmbCurrency.ValueMember = "exchangeRateId";
         cmbCurrency.SelectedValue = 1m;
     }
     catch (Exception ex)
     {
         MessageBox.Show("RO13:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
示例#6
0
        /// <summary>
        /// Function to fill currency combo box
        /// </summary>
        public void CurrencyComboFill()
        {
            try
            {
                DataTable dtbl = new DataTable();
                TransactionsGeneralFill Obj = new TransactionsGeneralFill();
                dtbl = Obj.CurrencyComboByDate(dtmVoucherDate);
                dgvcmbCurrency.DataSource = dtbl;
                dgvcmbCurrency.DisplayMember = "currencyName";
                dgvcmbCurrency.ValueMember = "exchangeRateId";

                SettingsSP spSettings = new SettingsSP();
                if (spSettings.SettingsStatusCheck("MultiCurrency") == "Yes")
                {
                    dgvcmbCurrency.ReadOnly = false;
                }
                else
                {
                    dgvcmbCurrency.ReadOnly = true;

                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("PB:9" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
示例#7
0
 /// <summary>
 /// Function to use the Currency combofill function
 /// </summary>
 public void DGVCurrencyComboFill()
 {
     try
     {
         DataTable dtblCurrency = new DataTable();
         SettingsSP spSettings = new SettingsSP();
         TransactionsGeneralFill TransactionGeneralFillObj = new TransactionsGeneralFill();
         dtblCurrency = TransactionGeneralFillObj.CurrencyComboByDate(Convert.ToDateTime(txtDate.Text));
         cmbCurrency.DataSource = dtblCurrency;
         cmbCurrency.DisplayMember = "currencyName";
         cmbCurrency.ValueMember = "exchangeRateId";
         cmbCurrency.SelectedValue = 1m;
         if (spSettings.SettingsStatusCheck("MultiCurrency") == "Yes")
         {
             cmbCurrency.Enabled = true;
         }
         else
         {
             cmbCurrency.Enabled = false;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SO35:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
示例#8
0
 /// <summary>
 /// Here fill the currency combobox in the grid
 /// </summary>
 public void GridCurrencyComboFill()
 {
     try
     {
         DataTable dtbl = new DataTable();
         TransactionsGeneralFill TransactionGeneralFillObj = new TransactionsGeneralFill();
         dtbl = TransactionGeneralFillObj.CurrencyComboByDate(Convert.ToDateTime(dtpContraVoucherDate.Value));
         dgvcmbCurrency.DataSource = dtbl;
         DataRow drow = dtbl.NewRow();
         drow["currencyName"] = string.Empty;
         drow["exchangeRateId"] = 0;
         dtbl.Rows.InsertAt(drow, 0);
         dgvcmbCurrency.DisplayMember = "currencyName";
         dgvcmbCurrency.ValueMember = "exchangeRateId";
     }
     catch (Exception ex)
     {
         MessageBox.Show("CV:03" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }