当前位置: 首页>>代码示例>>C#>>正文


C# Open_Miracle.SettingsSP类代码示例

本文整理汇总了C#中Open_Miracle.SettingsSP的典型用法代码示例。如果您正苦于以下问题:C# SettingsSP类的具体用法?C# SettingsSP怎么用?C# SettingsSP使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SettingsSP类属于Open_Miracle命名空间,在下文中一共展示了SettingsSP类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CurrencyComboFill

 /// <summary>
 /// Currency Combofill Function
 /// </summary>
 public void CurrencyComboFill()
 {
     try
     {
         DataTable dtblCurrency = new DataTable();
         SettingsSP spSettings = new SettingsSP();
         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("PO1:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
开发者ID:jsoques,项目名称:openmiracle,代码行数:28,代码来源:frmPurchaseOrder.cs

示例2: StockJournalPrinting

        /// <summary>
        /// Function to print StockJournal in curresponding Crystal report
        /// </summary>
        /// <param name="dsStockJournal"></param>
        internal void StockJournalPrinting(DataSet dsStockJournal)
        {
            try
            {

                crptStockJournal crptStockJournalObj = new crptStockJournal();
                foreach (DataTable dtbl in dsStockJournal.Tables)
                {
                    if (dtbl.TableName == "Table")
                    {
                        crptStockJournalObj.Database.Tables["dtblCompany"].SetDataSource(dtbl);
                    }
                    else if (dtbl.TableName == "Table1")
                    {

                        crptStockJournalObj.Database.Tables["dtblStockJournalMaster"].SetDataSource(dtbl);

                    }
                    else if (dtbl.TableName == "Table2")
                    {
                        crptStockJournalObj.Database.Tables["dtblStockJournalDetailsConsumption"].SetDataSource(dtbl);

                    }
                    else if (dtbl.TableName == "Table3")
                    {
                        crptStockJournalObj.Database.Tables["dtblStockJournalDetailsProduction"].SetDataSource(dtbl);
                    }

                }
                this.crptViewer.ReportSource = crptStockJournalObj;
                SettingsSP spSettings = new SettingsSP();

                if (spSettings.SettingsStatusCheck("DirectPrint") == "No")
                {
                    base.Show();
                    this.BringToFront();
                }
                else
                {
                    crptStockJournalObj.PrintToPrinter(1, false, 0, 0);
                }
            }

            catch (Exception)
            {
                throw;
            }
        }
开发者ID:jsoques,项目名称:openmiracle,代码行数:52,代码来源:frmReport.cs

示例3: Checkreference

 /// <summary>
 /// Function to check the references in each one
 /// </summary>
 public void Checkreference()
 {
     try
     {
         SettingsSP SpSettings = new SettingsSP();
         DataTable dtbl = new DataTable();
         dtbl = SpSettings.SettinsCheckReference();
         if (bool.Parse(dtbl.Rows[0]["CurrencyExist"].ToString()) == true)
         {
             cbxMultiCurrency.Enabled = false;
         }
         else
         {
             cbxMultiCurrency.Enabled = true;
         }
         if (bool.Parse(dtbl.Rows[0]["Godown"].ToString()) == true)
         {
             cbxAllowGodown.Enabled = false;
         }
         else
         {
             cbxAllowGodown.Enabled = true;
         }
         if (bool.Parse(dtbl.Rows[0]["Rack"].ToString()) == true)
         {
             cbxAllowRack.Enabled = false;
         }
         else
         {
             cbxAllowRack.Enabled = true;
         }
         if (bool.Parse(dtbl.Rows[0]["BillByBillExist"].ToString()) == true)
         {
             cbxBillByBill.Enabled = false;
         }
         else
         {
             cbxBillByBill.Enabled = true;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("ST1: " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
开发者ID:jsoques,项目名称:openmiracle,代码行数:48,代码来源:frmSettings.cs

示例4: AmountWords

 /// <summary>
 /// Function to return amount in words
 /// </summary>
 /// <param name="decAmount"></param>
 /// <param name="decCurrId"></param>
 /// <returns></returns>
 public string AmountWords(decimal decAmount, decimal decCurrId)
 {
     string AountInWords = string.Empty; // To return the amount in words
     CurrencyInfo currencyInfo = new CurrencySP().CurrencyView(decCurrId);
     decAmount = Math.Round(decAmount, currencyInfo.NoOfDecimalPlaces); //Rounding according to decimal places of currency
     string strAmount = decAmount.ToString(); // Just keeping the whole amount as string for performing split operation on it
     string strAmountinwordsOfIntiger = string.Empty;  // To hold amount in words of intiger
     string strAmountInWordsOfDecimal = string.Empty; // To hold amoutn in words of decimal part
     string[] strPartsArray = strAmount.Split('.'); // Splitting with "." to get intiger part and decimal part seperately
     string strDecimaPart = string.Empty;                     // To hold decimal part
     if (strPartsArray.Length > 1)
         if (strPartsArray[1] != null)
             strDecimaPart = strPartsArray[1]; // Holding decimal portion if any
     if (strPartsArray[0] != null)
         strAmount = strPartsArray[0];    // Holding intiger part of amount
     else
         strAmount = string.Empty; ;
     if (strAmount.Trim() != string.Empty && decimal.Parse(strAmount) != 0)
         strAmountinwordsOfIntiger = NumberToText(long.Parse(strAmount));
     if (strDecimaPart.Trim() != string.Empty && decimal.Parse(strDecimaPart) != 0)
         strAmountInWordsOfDecimal = NumberToText(long.Parse(strDecimaPart));
     SettingsSP spSettings = new SettingsSP();
     if (spSettings.SettingsStatusCheck("ShowCurrencySymbol") != "Yes")
     {
         // Showing currency as suffix
         if (strAmountinwordsOfIntiger != string.Empty)
             AountInWords = strAmountinwordsOfIntiger + " " + currencyInfo.CurrencyName;
         if (strAmountInWordsOfDecimal != string.Empty)
             AountInWords = AountInWords + " and " + strAmountInWordsOfDecimal + " " + currencyInfo.SubunitName;
         AountInWords = AountInWords + " only";
     }
     else
     {
         // Showing currency as prefix
         if (strAmountinwordsOfIntiger != string.Empty)
             AountInWords = currencyInfo.CurrencyName + " " + strAmountinwordsOfIntiger;
         if (strAmountInWordsOfDecimal != string.Empty)
             AountInWords = AountInWords + " and " + currencyInfo.SubunitName + " " + strAmountInWordsOfDecimal;
         AountInWords = AountInWords + " only";
     }
     return AountInWords;
 }
开发者ID:JaseelAM,项目名称:OpenMiracle-Three-Tier,代码行数:48,代码来源:NumToText.cs

示例5: UnitComboFill

 /// <summary>
 /// Function to fill Unit combobox
 /// </summary>
 public void UnitComboFill()
 {
     try
     {
         dtbl = TransactionsGeneralFill.UnitViewAll(cmbUnit, false);
         SettingsSP spSettings = new SettingsSP();
         if (spSettings.SettingsStatusCheck("ShowUnit") == "Yes")
         {
             cmbUnit.Enabled = true;
         }
         else
         {
             cmbUnit.Enabled = false;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("MPC1:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
开发者ID:jsoques,项目名称:openmiracle,代码行数:23,代码来源:frmMultipleProductCreation.cs

示例6: CheckInvalidEntriesProduction

        /// <summary>
        /// Function to check invalid entries in production grid
        /// </summary>
        /// <param name="e"></param>
        public void CheckInvalidEntriesProduction(DataGridViewCellEventArgs e)
        {
            try
            {
                SettingsSP spSettings = new SettingsSP();
                if (dgvProduction.CurrentRow != null)
                {
                    if (!isValueChanged)
                    {
                        if (dgvProduction.CurrentRow.Cells["dgvtxtProductionProductName"].Value == null || dgvProduction.CurrentRow.Cells["dgvtxtProductionProductName"].Value.ToString().Trim() == string.Empty)
                        {
                            isValueChanged = true;
                            dgvProduction.CurrentRow.HeaderCell.Value = "X";
                            dgvProduction.CurrentRow.HeaderCell.Style.ForeColor = Color.Red;
                        }
                        else if (dgvProduction.CurrentRow.Cells["dgvtxtProductionQty"].Value == null || dgvProduction.CurrentRow.Cells["dgvtxtProductionQty"].Value.ToString().Trim() == string.Empty || Convert.ToDecimal(dgvProduction.CurrentRow.Cells["dgvtxtProductionQty"].Value) == 0)
                        {
                            isValueChanged = true;
                            dgvProduction.CurrentRow.HeaderCell.Value = "X";
                            dgvProduction.CurrentRow.HeaderCell.Style.ForeColor = Color.Red;
                        }

                        else if (spSettings.SettingsStatusCheck("AllowZeroValueEntry") == "No" && Convert.ToDecimal(dgvProduction.CurrentRow.Cells["dgvtxtProductionRate"].Value) == 0)
                        {

                            dgvProduction.CurrentRow.HeaderCell.Value = "X";
                            dgvProduction.CurrentRow.HeaderCell.Style.ForeColor = Color.Red;
                        }
                        else
                        {
                            isValueChanged = true;
                            dgvProduction.CurrentRow.HeaderCell.Value = string.Empty;
                        }
                    }
                    isValueChanged = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("SJ:42" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
开发者ID:jsoques,项目名称:openmiracle,代码行数:46,代码来源:frmStockJournal.cs

示例7: RemoveIncompleteRowsFromProductionGrid

        /// <summary>
        /// Function to remove incomplete rows from production grid
        /// </summary>
        /// <returns></returns>
        public bool RemoveIncompleteRowsFromProductionGrid()
        {
            SettingsSP spSettings = new SettingsSP();
            bool isOk = true;
            try
            {
                string strMessage = "Rows";
                int inC = 0, inForFirst = 0;
                int inRowcount = dgvConsumption.RowCount;
                int inLastRow = 1;
                foreach (DataGridViewRow dgvrowCur in dgvProduction.Rows)
                {
                    if (inLastRow < inRowcount)
                    {
                        if (dgvrowCur.HeaderCell.Value != null)
                        {
                            if (spSettings.SettingsStatusCheck("AllowZeroValueEntry") == "No" && Convert.ToDecimal(dgvrowCur.Cells["dgvtxtProductionAmount"].Value) == 0)
                            {
                                dgvProduction.CurrentRow.HeaderCell.Value = "X";
                                dgvProduction.CurrentRow.HeaderCell.Style.ForeColor = Color.Red;

                            }
                            if (dgvrowCur.HeaderCell.Value.ToString() == "X" || dgvrowCur.Cells["dgvtxtProductionProductName"].Value == null)
                            {
                                isOk = false;
                                if (inC == 0)
                                {
                                    strMessage = strMessage + Convert.ToString(dgvrowCur.Index + 1);
                                    inForFirst = dgvrowCur.Index;
                                    inC++;
                                }
                                else
                                {
                                    strMessage = strMessage + ", " + Convert.ToString(dgvrowCur.Index + 1);
                                }
                            }
                        }
                    }
                    inLastRow++;
                }
                inLastRow = 1;
                if (!isOk)
                {
                    strMessage = strMessage + " contains invalid entries. Do you want to continue?";
                    if (MessageBox.Show(strMessage, "OpenMiracle", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                    {
                        isOk = true;
                        for (int inK = 0; inK < dgvProduction.Rows.Count; inK++)
                        {
                            if (dgvProduction.Rows[inK].HeaderCell.Value != null && dgvProduction.Rows[inK].HeaderCell.Value.ToString() == "X")
                            {
                                if (!dgvProduction.Rows[inK].IsNewRow)
                                {
                                    dgvProduction.Rows.RemoveAt(inK);
                                    inK--;
                                    ProductionSerialNo();
                                }
                            }
                        }
                    }
                    else
                    {
                        dgvProduction.Focus();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("SJ:38" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return isOk;
        }
开发者ID:jsoques,项目名称:openmiracle,代码行数:76,代码来源:frmStockJournal.cs

示例8: CalculationMethod

 /// <summary>
 /// Function to set the calculation method by checking the settings
 /// </summary>
 public void CalculationMethod()
 {
     try
     {
         SettingsInfo InfoSettings = new SettingsInfo();
         SettingsSP SpSettings = new SettingsSP();
         //--------------- Selection Of Calculation Method According To Settings ------------------// 
         if (SpSettings.SettingsStatusCheck("StockValueCalculationMethod") == "FIFO")
         {
             calculationMethod = "FIFO";
         }
         else if (SpSettings.SettingsStatusCheck("StockValueCalculationMethod") == "Average Cost")
         {
             calculationMethod = "Average Cost";
         }
         else if (SpSettings.SettingsStatusCheck("StockValueCalculationMethod") == "High Cost")
         {
             calculationMethod = "High Cost";
         }
         else if (SpSettings.SettingsStatusCheck("StockValueCalculationMethod") == "Low Cost")
         {
             calculationMethod = "Low Cost";
         }
         else if (SpSettings.SettingsStatusCheck("StockValueCalculationMethod") == "Last Purchase Rate")
         {
             calculationMethod = "Last Purchase Rate";
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("AGR:6" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
开发者ID:jsoques,项目名称:openmiracle,代码行数:36,代码来源:frmAccountGroupReport.cs

示例9: dgvPaymentVoucher_CellValueChanged

        /// <summary>
        /// Gridview cell value changed , doing basic calculations and checking invalid entries
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgvPaymentVoucher_CellValueChanged(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex != -1 && e.ColumnIndex != -1)
                {
                    TotalAmount();

                    if (dgvPaymentVoucher.Rows[e.RowIndex].Cells["dgvcmbAccountLedger"].Value != null && dgvPaymentVoucher.Rows[e.RowIndex].Cells["dgvcmbAccountLedger"].Value.ToString() != string.Empty)
                    {

                        if (dgvPaymentVoucher.Rows[e.RowIndex].Cells["dgvcmbCurrency"].Value == null || dgvPaymentVoucher.Rows[e.RowIndex].Cells["dgvcmbCurrency"].Value.ToString() == string.Empty)
                        {
                            dgvPaymentVoucher.Rows[e.RowIndex].Cells["dgvcmbCurrency"].Value = Convert.ToDecimal(1);
                        }

                    }
                    AccountGroupSP spAccountGroup = new AccountGroupSP();
                    AccountLedgerSP SpAccountLedger = new AccountLedgerSP();
                    if (dgvPaymentVoucher.Rows[e.RowIndex].Cells["dgvcmbAccountLedger"].Value != null && dgvPaymentVoucher.Rows[e.RowIndex].Cells["dgvcmbAccountLedger"].Value.ToString().Trim() != string.Empty)
                    {
                        if (dgvPaymentVoucher.CurrentCell.ColumnIndex == dgvPaymentVoucher.CurrentRow.Cells["dgvcmbAccountLedger"].ColumnIndex)
                        {

                            /*************Remove partybalance while changing the ledger ************/
                            if (inUpdatingRowIndexForPartyRemove != -1)
                            {
                                int inTableRowCount = dtblPartyBalance.Rows.Count;
                                for (int inJ = 0; inJ < inTableRowCount; inJ++)
                                {
                                    if (dtblPartyBalance.Rows.Count == inJ)
                                    {
                                        break;
                                    }
                                    if (Convert.ToDecimal(dtblPartyBalance.Rows[inJ]["ledgerId"].ToString()) == decUpdatingLedgerForPartyremove)
                                    {
                                        if (dtblPartyBalance.Rows[inJ]["PartyBalanceId"].ToString() != "0")
                                        {
                                            arrlstOfDeletedPartyBalanceRow.Add(dtblPartyBalance.Rows[inJ]["PartyBalanceId"]);
                                        }
                                        dtblPartyBalance.Rows.RemoveAt(inJ);
                                        inJ--;
                                    }
                                }
                                dgvPaymentVoucher.Rows[e.RowIndex].Cells["dgvtxtAmount"].Value = string.Empty;
                                decUpdatingLedgerForPartyremove = 0;
                                inUpdatingRowIndexForPartyRemove = -1;
                            }
                            /*************************************************************************/
                            decimal decLedgerId = Convert.ToDecimal(dgvPaymentVoucher.Rows[e.RowIndex].Cells["dgvcmbAccountLedger"].Value.ToString());
                            bool IsBankAccount = spAccountGroup.AccountGroupwithLedgerId(decLedgerId);
                            decimal decI = Convert.ToDecimal(SpAccountLedger.AccountGroupIdCheck(dgvPaymentVoucher.CurrentRow.Cells["dgvcmbAccountLedger"].FormattedValue.ToString()));
                            if (decI > 0)//to make amount and currency read only when party is choosen as ledger
                            {
                                dgvPaymentVoucher.CurrentRow.Cells["dgvtxtAmount"].ReadOnly = true;
                                dgvPaymentVoucher.CurrentRow.Cells["dgvtxtAmount"].Value = string.Empty;
                                dgvPaymentVoucher.Rows[e.RowIndex].Cells["dgvcmbCurrency"].Value = Convert.ToDecimal(1);
                                dgvPaymentVoucher.CurrentRow.Cells["dgvcmbCurrency"].ReadOnly = true;
                            }
                            else
                            {
                                dgvPaymentVoucher.CurrentRow.Cells["dgvtxtAmount"].ReadOnly = false;
                                SettingsSP spSettings = new SettingsSP();
                                if (spSettings.SettingsStatusCheck("MultiCurrency") == "Yes")
                                {
                                    dgvcmbCurrency.ReadOnly = false;
                                }
                                else
                                {
                                    dgvcmbCurrency.ReadOnly = true;

                                }
                            }
                        }
                    }
                    CheckColumnMissing();
                    DateValidation objVal = new DateValidation();
                    TextBox txtDate1 = new TextBox();
                    if (dgvPaymentVoucher.Rows[e.RowIndex].Cells["dgvtxtChequeDate"].Value != null)
                    {

                        txtDate1.Text = dgvPaymentVoucher.Rows[e.RowIndex].Cells["dgvtxtChequeDate"].Value.ToString();
                        bool isDate = objVal.DateValidationFunction(txtDate1);
                        if (isDate)
                        {
                            dgvPaymentVoucher.Rows[e.RowIndex].Cells["dgvtxtChequeDate"].Value = txtDate1.Text;
                        }
                        else
                        {
                            dgvPaymentVoucher.Rows[e.RowIndex].Cells["dgvtxtChequeDate"].Value = PublicVariables._dtCurrentDate.ToString("dd-MMM-yyyy");
                        }
                    }
                }
            }
            catch (Exception ex)
//.........这里部分代码省略.........
开发者ID:jsoques,项目名称:openmiracle,代码行数:101,代码来源:frmPaymentVoucher.cs

示例10: dgvJournalVoucher_CellValueChanged

        /// <summary>
        /// On cellvalueChanged of dgvCreditNote
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgvJournalVoucher_CellValueChanged(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex != -1 && e.ColumnIndex != -1)
                {
                    DebitAndCreditTotal();

                    if (dgvJournalVoucher.Rows[e.RowIndex].Cells["dgvcmbAccountLedger"].Value != null && dgvJournalVoucher.Rows[e.RowIndex].Cells["dgvcmbAccountLedger"].Value.ToString() != string.Empty)
                    {

                        if (dgvJournalVoucher.Rows[e.RowIndex].Cells["dgvcmbCurrency"].Value == null || dgvJournalVoucher.Rows[e.RowIndex].Cells["dgvcmbCurrency"].Value.ToString() == string.Empty)
                        {
                            dgvJournalVoucher.Rows[e.RowIndex].Cells["dgvcmbCurrency"].Value = Convert.ToDecimal(1); //decExchangeRateId;
                        }

                    }

                    if (dgvJournalVoucher.Rows[e.RowIndex].Cells[e.ColumnIndex].OwningColumn.Name == "dgvcmbAccountLedger")
                    {
                        /*************Remove partybalance while changing the ledger ************/
                        if (inUpdatingRowIndexForPartyRemove != -1)
                        {
                            int inTableRowCount = dtblPartyBalance.Rows.Count;
                            for (int inJ = 0; inJ < inTableRowCount; inJ++)
                            {
                                if (dtblPartyBalance.Rows.Count == inJ)
                                {
                                    break;
                                }

                                if (Convert.ToDecimal(dtblPartyBalance.Rows[inJ]["ledgerId"].ToString()) == decUpdatingLedgerForPartyremove)
                                {
                                    if (dtblPartyBalance.Rows[inJ]["PartyBalanceId"].ToString() != "0")
                                    {
                                        arrlstOfDeletedPartyBalanceRow.Add(dtblPartyBalance.Rows[inJ]["PartyBalanceId"]);
                                    }
                                    dtblPartyBalance.Rows.RemoveAt(inJ);
                                    inJ--;
                                }
                            }

                            dgvJournalVoucher.Rows[e.RowIndex].Cells["dgvtxtAmount"].Value = string.Empty;

                            //reset
                            decUpdatingLedgerForPartyremove = 0;
                            inUpdatingRowIndexForPartyRemove = -1;
                        }
                        /*************************************************************************/

                        //-----------To make amount readonly when party is selected as ledger------------------------------//
                        AccountLedgerSP spAccountLedger = new AccountLedgerSP();
                        if (spAccountLedger.AccountGroupIdCheck(dgvJournalVoucher.Rows[e.RowIndex].Cells["dgvcmbAccountLedger"].FormattedValue.ToString()))
                        {
                            dgvJournalVoucher.Rows[e.RowIndex].Cells["dgvtxtAmount"].Value = string.Empty;
                            dgvJournalVoucher.Rows[e.RowIndex].Cells["dgvtxtAmount"].ReadOnly = true;

                        }
                        else
                        {
                            dgvJournalVoucher.Rows[e.RowIndex].Cells["dgvtxtAmount"].Value = string.Empty;
                            dgvJournalVoucher.Rows[e.RowIndex].Cells["dgvtxtAmount"].ReadOnly = false;
                            SettingsSP spSettings = new SettingsSP();
                            if (spSettings.SettingsStatusCheck("MultiCurrency") == "Yes")
                            {
                                dgvcmbCurrency.ReadOnly = false;
                            }
                            else
                            {
                                dgvcmbCurrency.ReadOnly = true;

                            }
                        }

                        //========================================================================================//
                    }

                    if (dgvJournalVoucher.Rows[e.RowIndex].Cells[e.ColumnIndex].OwningColumn.Name == "dgvcmbDrOrCr")
                    {
                        /*************Remove partybalance while changing the Dr/Cr ************/
                        if (inUpdatingRowIndexForPartyRemove != -1)
                        {
                            int inTableRowCount = dtblPartyBalance.Rows.Count;
                            for (int inJ = 0; inJ < inTableRowCount; inJ++)
                            {
                                if (dtblPartyBalance.Rows.Count == inJ)
                                {
                                    break;
                                }

                                if (Convert.ToDecimal(dtblPartyBalance.Rows[inJ]["ledgerId"].ToString()) == decUpdatingLedgerForPartyremove)
                                {
                                    if (dtblPartyBalance.Rows[inJ]["PartyBalanceId"].ToString() != "0")
                                    {
                                        arrlstOfDeletedPartyBalanceRow.Add(dtblPartyBalance.Rows[inJ]["PartyBalanceId"]);
//.........这里部分代码省略.........
开发者ID:jsoques,项目名称:openmiracle,代码行数:101,代码来源:frmJournalVoucher.cs

示例11: EditFunction


//.........这里部分代码省略.........
                 (0, "NA", InfoSalesMaster.VoucherNo, InfoSalesMaster.VoucherTypeId);
         InfoSalesMaster.SalesMasterId = decSalesInvoiceIdToEdit;
         InfoSalesMaster.AdditionalCost = Convert.ToDecimal(lblLedgerTotalAmount.Text);
         InfoSalesMaster.BillDiscount = Convert.ToDecimal(txtBillDiscount.Text.Trim());
         InfoSalesMaster.CreditPeriod = Convert.ToInt32(txtCreditPeriod.Text.Trim().ToString());
         InfoSalesMaster.CustomerName = txtCustomer.Text.Trim();
         InfoSalesMaster.Date = Convert.ToDateTime(txtDate.Text.ToString());
         InfoSalesMaster.ExchangeRateId = Convert.ToDecimal(cmbCurrency.SelectedValue.ToString());
         InfoSalesMaster.EmployeeId = Convert.ToDecimal(cmbSalesMan.SelectedValue.ToString());
         InfoSalesMaster.FinancialYearId = PublicVariables._decCurrentFinancialYearId;
         InfoSalesMaster.GrandTotal = Convert.ToDecimal(txtGrandTotal.Text.Trim());
         InfoSalesMaster.InvoiceNo = txtInvoiceNo.Text.Trim();
         InfoSalesMaster.LedgerId = Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString());
         InfoSalesMaster.VoucherTypeId = DecSalesInvoiceVoucherTypeId;
         InfoSalesMaster.VoucherNo = strVoucherNo;
         if (isAutomatic)
         {
             InfoSalesMaster.SuffixPrefixId = decSalseInvoiceSuffixPrefixId;
         }
         else
         {
             InfoSalesMaster.SuffixPrefixId = 0;
         }
         if (cmbSalesMode.Text == "Against SalesOrder")
         {
             InfoSalesMaster.OrderMasterId = Convert.ToDecimal(cmbSalesModeOrderNo.SelectedValue.ToString());
         }
         else
         {
             InfoSalesMaster.OrderMasterId = 0;
         }
         if (cmbSalesMode.Text == "Against Delivery Note")
         {
             InfoSalesMaster.DeliveryNoteMasterId = Convert.ToDecimal(cmbSalesModeOrderNo.SelectedValue.ToString());
         }
         else
         {
             InfoSalesMaster.DeliveryNoteMasterId = 0;
         }
         if (cmbSalesMode.Text == "Against Quotation")
         {
             InfoSalesMaster.QuotationMasterId = Convert.ToDecimal(cmbSalesModeOrderNo.SelectedValue.ToString());
         }
         else
         {
             InfoSalesMaster.QuotationMasterId = 0;
         }
         InfoSalesMaster.Narration = txtNarration.Text.Trim();
         InfoSalesMaster.PricinglevelId = Convert.ToDecimal(cmbPricingLevel.SelectedValue.ToString());
         InfoSalesMaster.SalesAccount = Convert.ToDecimal(cmbSalesAccount.SelectedValue.ToString());
         InfoSalesMaster.TotalAmount = Convert.ToDecimal(txtTotalAmount.Text.Trim());
         if (dgvSalesInvoice.Columns["dgvcmbSalesInvoiceTaxName"].Visible)
         {
             InfoSalesMaster.TaxAmount = Convert.ToDecimal(lblTaxTotalAmount.Text.Trim());
         }
         else
         {
             InfoSalesMaster.TaxAmount = 0;
         }
         InfoSalesMaster.UserId = PublicVariables._decCurrentUserId;
         InfoSalesMaster.LrNo = txtVehicleNo.Text;
         InfoSalesMaster.TransportationCompany = txtTransportCompany.Text.Trim();
         InfoSalesMaster.POS = false;
         InfoSalesMaster.CounterId = 0;
         InfoSalesMaster.ExtraDate = DateTime.Now;
         InfoSalesMaster.Extra1 = string.Empty;
         InfoSalesMaster.Extra2 = string.Empty;
         spSalesMaster.SalesMasterEdit(InfoSalesMaster);
         removeSalesInvoiceDetails();
         SalesInvoiceDetailsEditFill();
         if (cmbCashOrParty.Enabled)
         {
             LedgerPostingSP spLedgerPosting = new LedgerPostingSP();
             spLedgerPosting.LedgerPostDelete(strVoucherNo, DecSalesInvoiceVoucherTypeId);
             ledgerPostingAdd();
         }
         else
         {
             ledgerPostingEdit();
         }
         Messages.UpdatedMessage();
         if (cbxPrintAfterSave.Checked)
         {
             SettingsSP spSettings = new SettingsSP();
             if (spSettings.SettingsStatusCheck("Printer") == "Dot Matrix")
             {
                 PrintForDotMatrix(decSalesInvoiceIdToEdit);
             }
             else
             {
                 Print(decSalesInvoiceIdToEdit);
             }
         }
         this.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show("SI: 78" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
开发者ID:jsoques,项目名称:openmiracle,代码行数:101,代码来源:frmSalesInvoice.cs

示例12: InitialSettings

        /// <summary>
        /// Function for check settings
        /// </summary>
        public void InitialSettings()
        {

            try
            {
                SettingsSP spSettings = new SettingsSP();
                SettingsInfo info = new SettingsInfo();
                DataTable dtbl = new DataTable();
                dtbl = spSettings.SettingsViewAll();




                if (dtbl.Rows.Count > 0)
                {

                    foreach (DataRow item in dtbl.Rows)
                    {
                        info.SettingsName = item["settingsName"].ToString();
                        info.Status = item["status"].ToString();
                        if (info.SettingsName == "AllowBatch" && info.Status == "Yes")
                        {
                            cmbAllowBatch.Enabled = true;
                        }
                        if (info.SettingsName == "AllowBatch" && info.Status == "No")
                        {
                            cmbAllowBatch.Enabled = false;
                        }

                        if (info.SettingsName == "AllowSize" && info.Status == "Yes")
                        {
                            cmbSize.Enabled = true;
                            btnSizeAdd.Enabled = true;

                        }
                        if (info.SettingsName == "AllowSize" && info.Status == "No")
                        {
                            cmbSize.Enabled = false;
                            btnSizeAdd.Enabled = false;
                        }
                        if (info.SettingsName == "AllowModelNo" && info.Status == "Yes")
                        {
                            cmbModalNo.Enabled = true;
                            btnModalNo.Enabled = true;
                        }
                        if (info.SettingsName == "AllowModelNo" && info.Status == "No")
                        {
                            cmbModalNo.Enabled = false;
                            btnModalNo.Enabled = false;
                        }
                        if (info.SettingsName == "AllowGodown" && info.Status == "Yes")
                        {
                            cmbDefaultGodown.Enabled = true;
                            btnDefaultGodownAdd.Enabled = true;
                            dgvProductCreation.Columns["dgvcmbtgodown"].Visible = true;

                        }
                        if (info.SettingsName == "AllowGodown" && info.Status == "No")
                        {
                            cmbDefaultGodown.Enabled = false;
                            btnDefaultGodownAdd.Enabled = false;
                            dgvProductCreation.Columns["dgvcmbtgodown"].Visible = false;

                        }
                        if (info.SettingsName == "AllowRack" && info.Status == "Yes")
                        {
                            cmbDefaultRack.Enabled = true;
                            btnDefaultAdd.Enabled = true;

                            dgvProductCreation.Columns["dgvcmbrack"].Visible = true;


                        }
                        if (info.SettingsName == "AllowRack" && info.Status == "No")
                        {
                            cmbDefaultRack.Enabled = false;
                            btnDefaultAdd.Enabled = false;

                            dgvProductCreation.Columns["dgvcmbrack"].Visible = false;

                        }
                        if (info.SettingsName == "Tax" && info.Status == "No")
                        {
                            cmbTax.Enabled = false;
                            btnTaxAdd.Enabled = false;
                        }
                    }

                }



            }
            catch (Exception ex)
            {
                MessageBox.Show("PC:74" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
//.........这里部分代码省略.........
开发者ID:jsoques,项目名称:openmiracle,代码行数:101,代码来源:frmProductCreation.cs

示例13: Clear

 /// <summary>
 /// Function to clear
 /// </summary>
 public void Clear()
 {
     try
     {
         SettingsSP spSettings = new SettingsSP();
         txtCustomerName.Text = string.Empty;
         txtMailingName.Text = string.Empty;
         txtOpeningBalance.Text = "0.00";
         cmbDrorCr.Text = "Dr";
         txtAccountNo.Text = string.Empty;
         txtBranchName.Text = string.Empty;
         txtBranchCode.Text = string.Empty;
         txtMobile.Text = string.Empty;
         txtphone.Text = string.Empty;
         txtAddress.Text = string.Empty;
         txtEmail.Text = string.Empty;
         if (spSettings.SettingsStatusCheck("BillByBill") == "Yes")
         {
             cmbBillbyBill.Enabled = true;
             cmbBillbyBill.Text = "No";
         }
         else
         {
             cmbBillbyBill.Enabled = false;
         }
         cmbBillbyBill.Text = "No";
         cmbPricingLevel.SelectedIndex = 0;
         txtCreditLimit.Text = string.Empty;
         txtCreditPeriod.Text = string.Empty;
         txtTin.Text = string.Empty;
         txtPan.Text = string.Empty;
         txtCST.Text = string.Empty;
         txtCustomerName.Focus();
         cmbArea.SelectedIndex = 0;
         txtNarration.Text = string.Empty; ;
         cmbRoute.SelectedIndex = 0;
         txtCustomerNameSearch.Text = string.Empty;
         cmbAreaSearch.SelectedIndex = 0;
         cmbRoutSearch.SelectedIndex = 0;
         btnDelete.Enabled = false;
         btnSave.Text = "Save";
         GridFill();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Cus12:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
开发者ID:jsoques,项目名称:openmiracle,代码行数:51,代码来源:frmCustomer.cs

示例14: ShowBarcode

 /// <summary>
 /// Function to check the BarCode status in settings
 /// </summary>
 /// <returns></returns>
 public bool ShowBarcode()
 {
     bool isShow = false;
     SettingsSP spSettings = new SettingsSP();
     try
     {
         isShow = spSettings.ShowBarcode();
     }
     catch (Exception ex)
     {
         MessageBox.Show("SQ:22" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     return isShow;
 }
开发者ID:jsoques,项目名称:openmiracle,代码行数:18,代码来源:frmSalesQuotation.cs

示例15: ComboCurrencyFill

 /// <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);
     }
 }
开发者ID:jsoques,项目名称:openmiracle,代码行数:30,代码来源:frmSalesQuotation.cs


注:本文中的Open_Miracle.SettingsSP类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。