本文整理汇总了C#中OpenMiracle.BLL.SettingsBll.SettingsStatusCheck方法的典型用法代码示例。如果您正苦于以下问题:C# SettingsBll.SettingsStatusCheck方法的具体用法?C# SettingsBll.SettingsStatusCheck怎么用?C# SettingsBll.SettingsStatusCheck使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenMiracle.BLL.SettingsBll
的用法示例。
在下文中一共展示了SettingsBll.SettingsStatusCheck方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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 CurrencyBll().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));
SettingsBll BllSetting = new SettingsBll();
if (BllSetting.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;
}
示例2: SaveFunction
//.........这里部分代码省略.........
{
infoSalesBillTax.TaxId = Convert.ToInt32(dgvSalesInvoiceTax.Rows[inI].Cells["dgvtxtTtaxId"].Value.ToString());
infoSalesBillTax.TaxAmount = Convert.ToDecimal(dgvSalesInvoiceTax.Rows[inI].Cells["dgvtxtTtaxAmount"].Value.ToString());
BllSalesInvoice.SalesBillTaxAdd(infoSalesBillTax);
}
}
}
}
}
int inAddRowCount = dgvSalesInvoiceLedger.RowCount;
infoAdditionalCost.VoucherTypeId = DecSalesInvoiceVoucherTypeId;
infoAdditionalCost.VoucherNo = strVoucherNo;
infoAdditionalCost.ExtraDate = DateTime.Now;
infoAdditionalCost.Extra1 = string.Empty;
infoAdditionalCost.Extra2 = string.Empty;
for (int inI = 0; inI < inAddRowCount; inI++)
{
if (dgvSalesInvoiceLedger.Rows[inI].Cells["dgvCmbAdditionalCostledgerName"].Value != null && dgvSalesInvoiceLedger.Rows[inI].Cells["dgvCmbAdditionalCostledgerName"].Value.ToString() != string.Empty)
{
if (dgvSalesInvoiceLedger.Rows[inI].Cells["dgvtxtAdditionalCoastledgerAmount"].Value != null && dgvSalesInvoiceLedger.Rows[inI].Cells["dgvtxtAdditionalCoastledgerAmount"].Value.ToString() != string.Empty)
{
infoAdditionalCost.LedgerId = Convert.ToInt32(dgvSalesInvoiceLedger.Rows[inI].Cells["dgvCmbAdditionalCostledgerName"].Value.ToString());
if (!cmbCashOrbank.Visible)
{
infoAdditionalCost.Debit = 0;
infoAdditionalCost.Credit = Convert.ToDecimal(dgvSalesInvoiceLedger.Rows[inI].Cells["dgvtxtAdditionalCoastledgerAmount"].Value.ToString());
}
else
{
infoAdditionalCost.Debit = Convert.ToDecimal(dgvSalesInvoiceLedger.Rows[inI].Cells["dgvtxtAdditionalCoastledgerAmount"].Value.ToString());
infoAdditionalCost.Credit = 0;
}
bllAditionalCost.AdditionalCostAdd(infoAdditionalCost);
}
}
}
if (!cmbCashOrbank.Visible)
{
decimal decCAshOrBankId = 0;
decCAshOrBankId = Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString());
decimal decTotalAddAmount = Convert.ToDecimal(lblLedgerTotalAmount.Text.Trim().ToString());
if (decTotalAddAmount > 0)
{
infoAdditionalCost.Debit = decTotalAddAmount;
infoAdditionalCost.Credit = 0;
infoAdditionalCost.LedgerId = decCAshOrBankId;
infoAdditionalCost.VoucherTypeId = DecSalesInvoiceVoucherTypeId;
infoAdditionalCost.VoucherNo = strVoucherNo;
infoAdditionalCost.ExtraDate = DateTime.Now;
infoAdditionalCost.Extra1 = string.Empty;
infoAdditionalCost.Extra2 = string.Empty;
bllAditionalCost.AdditionalCostAdd(infoAdditionalCost);
}
}
else
{
if (cmbCashOrbank.Visible)
{
decimal decCAshOrBankId = 0;
decCAshOrBankId = Convert.ToDecimal(cmbCashOrbank.SelectedValue.ToString());
decimal decTotalAddAmount = Convert.ToDecimal(lblLedgerTotalAmount.Text.Trim().ToString());
if (decTotalAddAmount > 0)
{
infoAdditionalCost.Debit = 0;
infoAdditionalCost.Credit = decTotalAddAmount;
infoAdditionalCost.LedgerId = decCAshOrBankId;
infoAdditionalCost.VoucherTypeId = DecSalesInvoiceVoucherTypeId;
infoAdditionalCost.VoucherNo = strVoucherNo;
infoAdditionalCost.ExtraDate = DateTime.Now;
infoAdditionalCost.Extra1 = string.Empty;
infoAdditionalCost.Extra2 = string.Empty;
bllAditionalCost.AdditionalCostAdd(infoAdditionalCost);
}
}
}
ledgerPostingAdd();
if (BllSalesInvoice.SalesInvoiceInvoicePartyCheckEnableBillByBillOrNot(Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString())))
{
partyBalanceAdd();
}
Messages.SavedMessage();
if (cbxPrintAfterSave.Checked == true)
{
SettingsBll BllSettings = new SettingsBll();
if (BllSettings.SettingsStatusCheck("Printer") == "Dot Matrix")
{
PrintForDotMatrix(decSalesMasterId);
}
else
{
Print(decSalesMasterId);
}
}
Clear();
}
catch (Exception ex)
{
MessageBox.Show("SI: 70" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
示例3: PrintCheck
/// <summary>
/// Checking "TickPrintAfterSave" is set TRUE or FALSE
/// </summary>
public void PrintCheck()
{
try
{
SettingsBll BllSettings = new SettingsBll();
if (BllSettings.SettingsStatusCheck("TickPrintAfterSave") == "Yes")
{
cbxPrintAfterSave.Checked = true;
}
else
{
cbxPrintAfterSave.Checked = false;
}
}
catch (Exception ex)
{
MessageBox.Show("SV 12 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
示例4: CheckInvalidEntries
/// <summary>
/// To check whether the values of grid is valid or not
/// </summary>
/// <param name="e"></param>
public void CheckInvalidEntries(DataGridViewCellEventArgs e)
{
try
{
SettingsBll BllSettings = new SettingsBll();
if (dgvProduct.CurrentRow != null)
{
if (!isValueChange)
{
if (dgvProduct.CurrentRow.Cells["dgvtxtProductCode"].Value == null || dgvProduct.CurrentRow.Cells["dgvtxtProductCode"].Value.ToString().Trim() == "")
{
isValueChange = true;
dgvProduct.CurrentRow.HeaderCell.Value = "X";
dgvProduct.CurrentRow.HeaderCell.Style.ForeColor = Color.Red;
}
else if (dgvProduct.CurrentRow.Cells["dgvtxtQty"].Value == null || dgvProduct.CurrentRow.Cells["dgvtxtQty"].Value.ToString().Trim() == "")
{
isValueChange = true;
dgvProduct.CurrentRow.HeaderCell.Value = "X";
dgvProduct.CurrentRow.HeaderCell.Style.ForeColor = Color.Red;
}
else if (BllSettings.SettingsStatusCheck("AllowZeroValueEntry") == "No" && Convert.ToDecimal(dgvProduct.CurrentRow.Cells["dgvtxtAmount"].Value) == 0)
{
isValueChange = true;
dgvProduct.CurrentRow.HeaderCell.Value = "X";
dgvProduct.CurrentRow.HeaderCell.Style.ForeColor = Color.Red;
}
else if (dgvProduct.CurrentRow.Cells["dgvtxtQty"].Value == null || dgvProduct.CurrentRow.Cells["dgvtxtQty"].Value.ToString().Trim() == "" || Convert.ToDecimal(dgvProduct.CurrentRow.Cells["dgvtxtQty"].Value) == 0)
{
isValueChange = true;
dgvProduct.CurrentRow.HeaderCell.Value = "X";
dgvProduct.CurrentRow.HeaderCell.Style.ForeColor = Color.Red;
}
else if (dgvProduct.CurrentRow.Cells["dgvtxtProductName"].Value == null || dgvProduct.CurrentRow.Cells["dgvtxtProductName"].Value.ToString().Trim() == "")
{
isValueChange = true;
dgvProduct.CurrentRow.HeaderCell.Value = "X";
dgvProduct.CurrentRow.HeaderCell.Style.ForeColor = Color.Red;
}
else if (dgvProduct.CurrentRow.Cells["dgvcmbGodown"].Value == null || dgvProduct.CurrentRow.Cells["dgvcmbGodown"].Value.ToString().Trim() == string.Empty)
{
isValueChange = true;
dgvProduct.CurrentRow.HeaderCell.Value = "X";
dgvProduct.CurrentRow.HeaderCell.Style.ForeColor = Color.Red;
}
else
{
isValueChange = true;
dgvProduct.CurrentRow.HeaderCell.Value = "";
}
}
isValueChange = false;
}
}
catch (Exception ex)
{
MessageBox.Show("DN24: " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
示例5: SaveOrEditFunction
/// <summary>
///Function for Save Or Edit while changing NegativeStockStatus in Settings
/// </summary>
public void SaveOrEditFunction()
{
try
{
decimal decProductId = 0;
decimal decBatchId = 0;
decimal decCalcQty = 0;
SettingsBll BllSettings = new SettingsBll();
string strStatus = BllSettings.SettingsStatusCheck("NegativeStockStatus");
bool isNegativeLedger = false;
StockPostingBll BllStockPosting = new StockPostingBll();
//StockPostingSP spStockPosting = new StockPostingSP();
int inRowCount = dgvProduct.RowCount;
for (int i = 0; i < inRowCount; i++)
{
if (dgvProduct.Rows[i].Cells["dgvtxtproductId"].Value != null && dgvProduct.Rows[i].Cells["dgvtxtproductId"].Value.ToString() != string.Empty)
{
decProductId = Convert.ToDecimal(dgvProduct.Rows[i].Cells["dgvtxtproductId"].Value.ToString());
if (dgvProduct.Rows[i].Cells["dgvcmbBatch"].Value != null && dgvProduct.Rows[i].Cells["dgvcmbBatch"].Value.ToString() != string.Empty)
{
decBatchId = Convert.ToDecimal(dgvProduct.Rows[i].Cells["dgvcmbBatch"].Value.ToString());
}
decimal decCurrentStock = BllStockPosting.StockCheckForProductSale(decProductId, decBatchId);
if (dgvProduct.Rows[i].Cells["dgvtxtQty"].Value != null && dgvProduct.Rows[i].Cells["dgvtxtQty"].Value.ToString() != string.Empty)
{
decCalcQty = decCurrentStock - Convert.ToDecimal(dgvProduct.Rows[i].Cells["dgvtxtQty"].Value.ToString());
}
if (decCalcQty < 0)
{
isNegativeLedger = true;
break;
}
}
}
if (isNegativeLedger)
{
if (strStatus == "Warn")
{
if (MessageBox.Show("Negative Stock balance exists,Do you want to Continue", "Open miracle", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
{
SaveOrEdit();
}
}
else if (strStatus == "Block")
{
MessageBox.Show("Cannot continue ,due to negative stock balance", "Open miracle", MessageBoxButtons.OK, MessageBoxIcon.Stop);
// Clear();
}
else
{
SaveOrEdit();
}
}
else
{
SaveOrEdit();
}
}
catch (Exception ex)
{
MessageBox.Show("DN46 :" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
示例6: GridFill
/// <summary>
/// Function to fill Datagridview after calculation
/// </summary>
public void GridFill()
{
try
{
if (!isFormLoad)
{
string calculationMethod = string.Empty;
SettingsInfo InfoSettings = new SettingsInfo();
SettingsBll BllSettings = new SettingsBll();
//--------------- Selection Of Calculation Method According To Settings ------------------//
if (BllSettings.SettingsStatusCheck("StockValueCalculationMethod") == "FIFO")
{
calculationMethod = "FIFO";
}
else if (BllSettings.SettingsStatusCheck("StockValueCalculationMethod") == "Average Cost")
{
calculationMethod = "Average Cost";
}
else if (BllSettings.SettingsStatusCheck("StockValueCalculationMethod") == "High Cost")
{
calculationMethod = "High Cost";
}
else if (BllSettings.SettingsStatusCheck("StockValueCalculationMethod") == "Low Cost")
{
calculationMethod = "Low Cost";
}
else if (BllSettings.SettingsStatusCheck("StockValueCalculationMethod") == "Last Purchase Rate")
{
calculationMethod = "Last Purchase Rate";
}
FinancialStatementBll bllFinancialStatement = new FinancialStatementBll();
DataTable dtbl1 = new DataTable();
CurrencyInfo InfoCurrency = new CurrencyInfo();
CurrencyBll BllCurrency = new CurrencyBll();
int inDecimalPlaces = InfoCurrency.NoOfDecimalPlaces;
decimal dcClosingStock = bllFinancialStatement.StockValueGetOnDate(Convert.ToDateTime(txtTodate.Text), calculationMethod, false, false);
dcClosingStock = Math.Round(dcClosingStock, inDecimalPlaces);
//---------------------Opening Stock-----------------------
decimal dcOpeninggStock = bllFinancialStatement.StockValueGetOnDate(PublicVariables._dtFromDate, calculationMethod, true, true);
decimal dcProfit = 0;
DataSet dsetProfitAndLoss = new DataSet();
dsetProfitAndLoss = bllFinancialStatement.ProfitAndLossAnalysisUpToaDateForBalansheet(PublicVariables._dtFromDate, DateTime.Parse(txtTodate.Text));
DataTable dtblProfit = new DataTable();
dtblProfit = dsetProfitAndLoss.Tables[0];
for (int i = 0; i < dsetProfitAndLoss.Tables.Count; ++i)
{
dtbl1 = dsetProfitAndLoss.Tables[i];
decimal dcSum = 0;
if (i == 0 || (i % 2) == 0)
{
if (dtbl1.Rows.Count > 0)
{
dcSum = decimal.Parse(dtbl1.Compute("Sum(Debit)", string.Empty).ToString());
}
}
else
{
if (dtbl1.Rows.Count > 0)
{
dcSum = decimal.Parse(dtbl1.Compute("Sum(Credit)", string.Empty).ToString());
}
}
}
DateValidation objValidation = new DateValidation();
objValidation.DateValidationFunction(txtTodate);
if (txtTodate.Text == string.Empty)
txtTodate.Text = PublicVariables._dtToDate.ToString("dd-MMM-yyyy");
Font newFont = new Font(dgvTrailBalance.Font, FontStyle.Bold);
DataSet DsetTrailbalance = new DataSet();
DataTable dtbl = new DataTable();
decimal dcTotalCredit = 0;
decimal dcTotalDebit = 0;
DateValidation objvalidation = new DateValidation();
objvalidation.DateValidationFunction(txtFromDate);
if (txtFromDate.Text == string.Empty)
{
txtFromDate.Text = PublicVariables._dtFromDate.ToString("dd-MMM-yyyy");
}
objvalidation.DateValidationFunction(txtTodate);
if (txtTodate.Text == string.Empty)
{
txtTodate.Text = PublicVariables._dtToDate.ToString("dd-MMM-yyyy");
}
DataTable dtblTrail = new DataTable();
DataTable dtblTrail1 = new DataTable();
DataTable dtblProfitAndLossAcc = new DataTable();
DataTable dtblProfitAndLossAcc1 = new DataTable();
DataSet dsTrial = new DataSet();
Font newfont = new Font(dgvTrailBalance.Font, FontStyle.Bold);
dgvTrailBalance.Rows.Clear();
dsTrial = bllFinancialStatement.TrialBalance(DateTime.Parse(txtFromDate.Text), DateTime.Parse(txtTodate.Text), 0);
dtblTrail = dsTrial.Tables[0];
dtblProfitAndLossAcc = dsTrial.Tables[1];
if (dgvTrailBalance.RowCount > 0)
//.........这里部分代码省略.........
示例7: Clear
/// <summary>
/// These function is used to reset the form and clear its controlls
/// </summary>
public void Clear()
{
try
{
if (isAutomatic)
{
VoucherNumberGeneration();
txtContraVoucherDate.Focus();
}
else
{
txtVoucherNo.Text = string.Empty;
txtVoucherNo.ReadOnly = false;
}
BankOrCashComboFill(cmbBankAccount);
GridBankOrCashComboFill();
isEditMode = false;
dtpContraVoucherDate.MinDate = PublicVariables._dtFromDate;
dtpContraVoucherDate.MaxDate = PublicVariables._dtToDate;
CompanyInfo infoComapany = new CompanyInfo();
//CompanySP spCompany = new CompanySP();
CompanyCreationBll bllCompanyCreation = new CompanyCreationBll();
infoComapany = bllCompanyCreation.CompanyView(1);
DateTime dtVoucherDate = infoComapany.CurrentDate;
dtpContraVoucherDate.Value = dtVoucherDate;
txtContraVoucherDate.Text = dtVoucherDate.ToString("dd-MMM-yyyy");
dtpContraVoucherDate.Value = Convert.ToDateTime(txtContraVoucherDate.Text);
txtContraVoucherDate.Focus();
txtContraVoucherDate.SelectAll();
if (txtVoucherNo.ReadOnly)
{
txtContraVoucherDate.Focus();
}
else
{
txtVoucherNo.Focus();
}
cmbBankAccount.SelectedIndex = -1;
txtNarration.Text = string.Empty;
txtTotal.Text = string.Empty;
dgvContraVoucher.ClearSelection();
rbtnDeposit.Checked = true;
btnDelete.Enabled = false;
btnSave.Text = "Save";
dgvContraVoucher.Rows.Clear();
if (frmContraRegisterObj != null)
{
frmContraRegisterObj.Close();
}
if (frmContraReportObj != null)
{
frmContraReportObj.Close();
}
SettingsBll BllSettings = new SettingsBll();
if (BllSettings.SettingsStatusCheck("TickPrintAfterSave") == "Yes")
{
cbxPrintafterSave.Checked = true;
}
else
{
cbxPrintafterSave.Checked = false;
}
}
catch (Exception ex)
{
MessageBox.Show("CV:09" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
示例8: SaveOrEditFuction
/// <summary>
/// Checking invalid entries for save or update and call its curresponding function
/// </summary>
public void SaveOrEditFuction()
{
try
{
decimal decCalcAmount = 0;
decimal decBalance = 0;
string strStatus = string.Empty;
//ContraMasterSP spContraMaster = new ContraMasterSP();
ContraVoucherDetailsBll bllContraVoucherDetails = new ContraVoucherDetailsBll();
AccountLedgerBll bllAccountLedger = new AccountLedgerBll();
SettingsBll BllSettings = new SettingsBll();
if (txtVoucherNo.Text == string.Empty)
{
Messages.InformationMessage("Enter voucher number");
txtVoucherNo.Focus();
}
else if (cmbBankAccount.SelectedIndex == -1)
{
Messages.InformationMessage("Select cash or bank account");
cmbBankAccount.Focus();
}
else
{
if (RemoveIncompleteRowsFromGrid())
{
if (dtpContraVoucherDate.Value.ToString() != string.Empty)
{
strStatus = BllSettings.SettingsStatusCheck("NegativeCashTransaction");
if (rbtnWithdrawal.Checked)
{
decBalance = bllAccountLedger.CheckLedgerBalance(Convert.ToDecimal(cmbBankAccount.SelectedValue.ToString()));
decCalcAmount = decBalance - Convert.ToDecimal(txtTotal.Text);
if (decCalcAmount < 0)
{
if (strStatus == "Warn")
{
if (MessageBox.Show("Negative balance exists,Do you want to Continue", "Openmiracle", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
{
SaveOrEdit();
}
}
else if (strStatus == "Block")
{
MessageBox.Show("Cannot continue ,due to negative balance", "Openmiracle", MessageBoxButtons.OK, MessageBoxIcon.Stop);
}
else
{
SaveOrEdit();
}
}
else
{
SaveOrEdit();
}
}
else
{
bool isNegativeLedger = false;
int inRowCount = dgvContraVoucher.RowCount;
for (int i = 0; i < inRowCount - 1; i++)
{
decCalcAmount = 0;
decimal decledgerId = 0;
if (dgvContraVoucher.Rows[i].Cells["dgvcmbBankorCashAccount"].Value != null && dgvContraVoucher.Rows[i].Cells["dgvcmbBankorCashAccount"].Value.ToString() != "")
{
decledgerId = Convert.ToDecimal(dgvContraVoucher.Rows[i].Cells["dgvcmbBankorCashAccount"].Value.ToString());
}
decBalance = bllAccountLedger.CheckLedgerBalance(decledgerId);
decCalcAmount = decBalance - Convert.ToDecimal(dgvContraVoucher.Rows[i].Cells["dgvtxtAmount"].Value.ToString());
if (decCalcAmount < 0)
{
isNegativeLedger = true;
break;
}
}
if (isNegativeLedger)
{
if (strStatus == "Warn")
{
if (MessageBox.Show("Negative balance exists,Do you want to Continue", "Openmiracle", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
{
SaveOrEdit();
}
}
else if (strStatus == "Block")
{
MessageBox.Show("Cannot continue ,due to negative balance", "Openmiracle", MessageBoxButtons.OK, MessageBoxIcon.Stop);
}
else
{
SaveOrEdit();
}
}
else
{
SaveOrEdit();
//.........这里部分代码省略.........
示例9: cmbItem_KeyDown
/// <summary>
/// For enter key and backspace navigation
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void cmbItem_KeyDown(object sender, KeyEventArgs e)
{
string strProductName;
try
{
SettingsBll BllSettings = new SettingsBll();
if (e.KeyCode == Keys.Enter)
{
if (BllSettings.SettingsStatusCheck("AllowGodown") == "Yes")
{
cmbGodown.Focus();
cmbGodown.SelectionStart = 0;
}
else if (BllSettings.SettingsStatusCheck("AllowBatch") == "Yes")
{
cmbBatch.Focus();
}
else
{
txtQuantity.Focus();
txtQuantity.Select();
}
}
else if (e.KeyCode == Keys.Back)
{
if (txtProductCode.Visible)
{
if (txtProductCode.Text.Trim() != string.Empty || txtProductCode.SelectionLength == 0)
{
txtProductCode.SelectionStart = 0;
txtProductCode.Focus();
}
}
else
{
txtBarcode.Focus();
txtBarcode.Select();
}
}
else if (e.KeyCode == Keys.F && Control.ModifierKeys == Keys.Control) //Pop Up
{
if (cmbItem.Focused)
{
cmbItem.DropDownStyle = ComboBoxStyle.DropDown;
}
else
{
cmbItem.DropDownStyle = ComboBoxStyle.DropDownList;
}
if (cmbItem.SelectedIndex != -1)
{
frmProductSearchPopup frmProductSearchPopupObj = new frmProductSearchPopup();
frmProductSearchPopupObj.MdiParent = formMDI.MDIObj;
frmProductSearchPopupObj.CallFromPOS(this, cmbItem.SelectedIndex, txtProductCode.Text);
}
else
{
frmProductSearchPopup frmProductSearchPopupObj = new frmProductSearchPopup();
frmProductSearchPopupObj.MdiParent = formMDI.MDIObj;
frmProductSearchPopupObj.CallFromPOS(this, cmbItem.SelectedIndex, string.Empty);
}
}
else if (e.KeyCode == Keys.C && Control.ModifierKeys == Keys.Alt) //Creation
{
frmProductCreation frmProductCreationObj = new frmProductCreation();
bool isFromItemCombo = true;
if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmProductCreation", "Save"))
{
if (cmbItem.SelectedValue != null)
{
strProductName = cmbItem.SelectedValue.ToString();
}
else
{
strProductName = string.Empty;
}
frmProductCreationObj.MdiParent = formMDI.MDIObj;
frmProductCreationObj.CallFromPOSForProductCreation(this, isFromItemCombo);
}
else
{
MessageBox.Show("You don’t have privilege", "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
catch (Exception ex)
{
MessageBox.Show("POS: 116" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
示例10: cmbBatch_KeyDown
/// <summary>
/// For enter key and backspace navigation
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void cmbBatch_KeyDown(object sender, KeyEventArgs e)
{
try
{
SettingsBll BllSettings = new SettingsBll();
if (e.KeyCode == Keys.Enter)
{
txtQuantity.Focus();
}
else if (e.KeyCode == Keys.Back)
{
if (BllSettings.SettingsStatusCheck("AllowGodown") == "Yes")
{
cmbRack.Focus();
}
else
{
cmbItem.Focus();
cmbItem.Select();
}
}
}
catch (Exception ex)
{
MessageBox.Show("POS: 119" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
示例11: SaveFunction
//.........这里部分代码省略.........
else
{
InfoSalesMaster.SuffixPrefixId = 0;
InfoSalesMaster.VoucherNo = txtVoucherNo.Text;
}
InfoSalesMaster.ExtraDate = DateTime.Now;
InfoSalesMaster.Extra1 = string.Empty;
InfoSalesMaster.Extra2 = string.Empty;
decSalesMasterId = BllSalesInvoice.SalesMasterAdd(InfoSalesMaster);
int inRowCount = dgvPointOfSales.RowCount;
InfoSalesDetails.SalesMasterId = decSalesMasterId;
InfoSalesDetails.ExtraDate = DateTime.Now;
InfoSalesDetails.Extra1 = string.Empty;
InfoSalesDetails.Extra2 = string.Empty;
for (int inI = 0; inI < inRowCount; inI++)
{
if (dgvPointOfSales.Rows[inI].Cells["dgvtxtProductName"].Value != null && dgvPointOfSales.Rows[inI].Cells["dgvtxtProductName"].Value.ToString() != string.Empty)
{
if (dgvPointOfSales.Rows[inI].Cells["dgvtxtQuantity"].Value != null && dgvPointOfSales.Rows[inI].Cells["dgvtxtQuantity"].Value.ToString() != string.Empty)
{
InfoSalesDetails.SlNo = Convert.ToInt32(dgvPointOfSales.Rows[inI].Cells["dgvtxtSlNo"].Value.ToString());
InfoSalesDetails.ProductId = Convert.ToDecimal(dgvPointOfSales.Rows[inI].Cells["dgvtxtProductId"].Value.ToString());
InfoSalesDetails.Qty = Convert.ToDecimal(dgvPointOfSales.Rows[inI].Cells["dgvtxtQuantity"].Value.ToString());
InfoSalesDetails.Rate = Convert.ToDecimal(dgvPointOfSales.Rows[inI].Cells["dgvtxtRate"].Value.ToString());
InfoSalesDetails.UnitId = Convert.ToDecimal(dgvPointOfSales.Rows[inI].Cells["dgvtxtUnitId"].Value.ToString());
InfoSalesDetails.UnitConversionId = Convert.ToDecimal(dgvPointOfSales.Rows[inI].Cells["dgvtxtunitconversionId"].Value.ToString());
InfoSalesDetails.Discount = Convert.ToDecimal(dgvPointOfSales.Rows[inI].Cells["dgvtxtDiscount"].Value.ToString());
InfoSalesDetails.TaxId = Convert.ToDecimal(dgvPointOfSales.Rows[inI].Cells["dgvtxttaxid"].Value.ToString());
InfoSalesDetails.BatchId = Convert.ToDecimal(dgvPointOfSales.Rows[inI].Cells["dgvtxtBatchId"].Value.ToString());
InfoSalesDetails.GodownId = Convert.ToDecimal(dgvPointOfSales.Rows[inI].Cells["dgvtxtGodownId"].Value.ToString());
InfoSalesDetails.RackId = Convert.ToDecimal(dgvPointOfSales.Rows[inI].Cells["dgvtxtRackId"].Value.ToString());
InfoSalesDetails.TaxAmount = Convert.ToDecimal(dgvPointOfSales.Rows[inI].Cells["dgvtxtTaxAmount"].Value.ToString());
InfoSalesDetails.GrossAmount = Convert.ToDecimal(dgvPointOfSales.Rows[inI].Cells["dgvtxtGrossValue"].Value.ToString());
InfoSalesDetails.NetAmount = Convert.ToDecimal(dgvPointOfSales.Rows[inI].Cells["dgvtxtNetAmount"].Value.ToString());
InfoSalesDetails.Amount = Convert.ToDecimal(dgvPointOfSales.Rows[inI].Cells["dgvtxtTotalAmount"].Value.ToString());
BllSalesInvoice.SalesDetailsAdd(InfoSalesDetails);
infoStockPosting.Date = InfoSalesMaster.Date;
infoStockPosting.VoucherTypeId = DecPOSVoucherTypeId;
infoStockPosting.VoucherNo = strVoucherNo;
infoStockPosting.InvoiceNo = txtVoucherNo.Text.Trim();
infoStockPosting.AgainstVoucherTypeId = 0;
infoStockPosting.AgainstVoucherNo = "NA";
infoStockPosting.AgainstInvoiceNo = "NA";
infoStockPosting.ProductId = InfoSalesDetails.ProductId;
infoStockPosting.BatchId = InfoSalesDetails.BatchId;
infoStockPosting.UnitId = InfoSalesDetails.UnitId;
infoStockPosting.GodownId = InfoSalesDetails.GodownId;
infoStockPosting.RackId = InfoSalesDetails.RackId;
infoStockPosting.InwardQty = 0;
infoStockPosting.OutwardQty = InfoSalesDetails.Qty / bllUnitConversion.UnitConversionRateByUnitConversionId(InfoSalesDetails.UnitConversionId); ;
infoStockPosting.Rate = InfoSalesDetails.Rate;
infoStockPosting.FinancialYearId = InfoSalesMaster.FinancialYearId;
infoStockPosting.Extra1 = string.Empty;
infoStockPosting.Extra2 = string.Empty;
BllStockPosting.StockPostingAdd(infoStockPosting);
}
}
}
int inTaxRowCount = dgvPOSTax.RowCount;
InfoSalesBillTax.SalesMasterId = decSalesMasterId;
InfoSalesBillTax.ExtraDate = DateTime.Now;
InfoSalesBillTax.Extra1 = string.Empty;
InfoSalesBillTax.Extra2 = string.Empty;
for (int inI = 0; inI < inTaxRowCount; inI++)
{
if (dgvPOSTax.Rows[inI].Cells["dgvtxttax"].Value != null && dgvPOSTax.Rows[inI].Cells["dgvtxttax"].Value.ToString() != string.Empty)
{
if (dgvPOSTax.Rows[inI].Cells["dgvtxtTaxAmt"].Value != null && dgvPOSTax.Rows[inI].Cells["dgvtxtTaxAmt"].Value.ToString() != string.Empty)
{
InfoSalesBillTax.TaxId = Convert.ToInt32(dgvPOSTax.Rows[inI].Cells["dgvtxttax"].Value.ToString());
InfoSalesBillTax.TaxAmount = Convert.ToDecimal(dgvPOSTax.Rows[inI].Cells["dgvtxtTaxAmt"].Value.ToString());
BllSalesInvoice.SalesBillTaxAdd(InfoSalesBillTax);
}
}
}
ledgerPostingAdd();
if (BllSalesInvoice.SalesInvoiceInvoicePartyCheckEnableBillByBillOrNot(Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString())))
{
partyBalanceAdd();
}
Messages.SavedMessage();
if (cbxPrintAfterSave.Checked)
{
SettingsBll BllSettings = new SettingsBll();
if (BllSettings.SettingsStatusCheck("Printer") == "Dot Matrix")
{
PrintForDotMatrix(decSalesMasterId);
}
else
{
Print(decSalesMasterId);
}
}
ClearFunctions();
}
catch (Exception ex)
{
MessageBox.Show("POS:44" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
示例12: QuantityStatusCheck
/// <summary>
/// Function to Quantity Status Check
/// </summary>
public void QuantityStatusCheck()
{
try
{
decimal decProductId = 0;
decimal decBatchId = 0;
decimal decCalcQty = 0;
StockPostingBll BllStockPosting = new StockPostingBll();
SettingsBll BllSettings = new SettingsBll();
string strStatus = BllSettings.SettingsStatusCheck("NegativeStockStatus");
bool isNegativeLedger = false;
if (cmbItem.SelectedIndex != -1)
{
decProductId = Convert.ToDecimal(cmbItem.SelectedValue.ToString());
batchcombofill();
decBatchId = Convert.ToDecimal(cmbBatch.SelectedValue.ToString());
decimal decCurrentStock = BllStockPosting.StockCheckForProductSale(decProductId, decBatchId);
if (txtQuantity.Text != null || txtQuantity.Text != string.Empty)
{
decCalcQty = decCurrentStock - Convert.ToDecimal(txtQuantity.Text.Trim().ToString());
}
if (decCalcQty < 0)
{
isNegativeLedger = true;
}
}
if (isNegativeLedger)
{
if (strStatus == "Warn")
{
if (MessageBox.Show("Negative Stock balance exists,Do you want to Continue", "Open miracle", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
{
AddToGrid();
}
else
{
cmbItem.Focus();
}
}
else if (strStatus == "Block")
{
MessageBox.Show("Cannot continue ,due to negative stock balance", "Open miracle", MessageBoxButtons.OK, MessageBoxIcon.Stop);
cmbItem.Focus();
}
else
{
AddToGrid();
}
}
else
{
AddToGrid();
}
}
catch (Exception ex)
{
MessageBox.Show("POS :42 " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
示例13: AddToGrid
/// <summary>
/// Function to add the products to grid
/// </summary>
public void AddToGrid()
{
BatchBll BllBatch = new BatchBll();
GodownBll BllGodown = new GodownBll();
try
{
SettingsBll BllSettings = new SettingsBll();
if (txtProductCode.Text.Trim() == null && txtProductCode.Text.Trim() == string.Empty)
{
Messages.InformationMessage("Enter product code");
txtProductCode.Focus();
}
else if (cmbItem.SelectedIndex == -1 && cmbItem.SelectedValue == null)
{
Messages.InformationMessage("Select a product");
cmbItem.Focus();
}
else if (Convert.ToDecimal(txtQuantity.Text.Trim()) <= 0 || txtQuantity.Text.Trim() == string.Empty)
{
Messages.InformationMessage("Enter quantity");
txtQuantity.Focus();
}
else if (cmbUnit.SelectedValue == null)
{
Messages.InformationMessage("Select a unit");
cmbUnit.Focus();
}
else if (BllSettings.SettingsStatusCheck("AllowZeroValueEntry") == "No" && decimal.Parse(txtRate.Text.Trim()) <= 0 || txtRate.Text.Trim() == string.Empty)
{
Messages.InformationMessage("Enter rate");
txtRate.Focus();
}
else
{
int inCurrentRowIndex = new int();
bool isExecutef = false;
if (rowIdToEdit == 0)
{
dgvPointOfSales.Rows.Add();
inCurrentRowIndex = dgvPointOfSales.Rows.Count - 1;
isExecutef = true;
}
else
{
for (int i = 0; i < dgvPointOfSales.Rows.Count; ++i)
{
if (dgvPointOfSales.Rows[i].Cells["rowId"].Value.ToString() == rowIdToEdit.ToString())
{
isExecutef = true;
inCurrentRowIndex = i;
break;
}
}
}
if (!isExecutef)
{
dgvPointOfSales.Rows.Add();
inCurrentRowIndex = dgvPointOfSales.Rows.Count - 1;
}
ProductInfo infoProduct = new ProductInfo();
BatchInfo infoBatch = new BatchInfo();
RackInfo infoRack = new RackInfo();
ProductCreationBll BllProductCreation = new ProductCreationBll();
UnitConvertionInfo InfoUnitConvertion = new UnitConvertionInfo();
infoProduct = BllProductCreation.ProductView(decProductId);
decimal dcProductBatch = BllBatch.BatchIdViewByProductId(decProductId);
InfoUnitConvertion = new UnitConvertionBll().UnitViewAllByProductId(decProductId);
infoBatch = BllBatch.BatchView(dcProductBatch);
decimal dcGodownId = infoProduct.GodownId;
GodownInfo infoGodown = new GodownInfo();
infoGodown = BllGodown.GodownView(dcGodownId);
decimal dcRackId = infoProduct.RackId;
infoRack = new RackBll().RackView(dcRackId);
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtProductCode"].Value = txtProductCode.Text;
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtProductName"].Value = cmbItem.Text;
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtQuantity"].Value = txtQuantity.Text;
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtUnit"].Value = cmbUnit.Text;
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtRate"].Value = txtRate.Text;
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtGrossValue"].Value = txtGrossValue.Text;
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtTaxPercentage"].Value = cmbTax.Text;
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtTaxAmount"].Value = txtTaxAmount.Text;
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtNetAmount"].Value = txtNetAmount.Text;
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtDiscount"].Value = txtDiscountAmount.Text;
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtTotalAmount"].Value = txtAmount.Text;
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxttaxid"].Value = Convert.ToDecimal(cmbTax.SelectedValue);
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtProductId"].Value = infoProduct.ProductId;
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtBatchId"].Value = dcProductBatch;
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtRackId"].Value = infoProduct.RackId;
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtGodownId"].Value = infoProduct.GodownId;
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtUnitId"].Value = Convert.ToDecimal(cmbUnit.SelectedValue);
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtunitconversionId"].Value = InfoUnitConvertion.UnitconvertionId;
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtBarcode"].Value = txtBarcode.Text;
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtBatchno"].Value = infoBatch.BatchNo;
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtGodownName"].Value = infoGodown.GodownName;
dgvPointOfSales.Rows[inCurrentRowIndex].Cells["dgvtxtRackName"].Value = infoRack.RackName;
TotalAmountCalculation();
ClearGroupbox();
//.........这里部分代码省略.........
示例14: EditFunction
/// <summary>
/// Function to update the details
/// </summary>
public void EditFunction()
{
try
{
ExchangeRateBll BllExchangeRate = new ExchangeRateBll();
InfoSalesMaster.SalesMasterId = decSalesMasterId;
InfoSalesMaster.InvoiceNo = txtVoucherNo.Text.Trim();
InfoSalesMaster.AdditionalCost = 0;
InfoSalesMaster.LedgerId = Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString());
InfoSalesMaster.BillDiscount = Convert.ToDecimal(txtBillDiscount.Text);
InfoSalesMaster.CounterId = Convert.ToDecimal(cmbCounter.SelectedValue.ToString());
InfoSalesMaster.CreditPeriod = 0;
InfoSalesMaster.CustomerName = "";
InfoSalesMaster.Date = Convert.ToDateTime(txtDate.Text.Trim());
InfoSalesMaster.DeliveryNoteMasterId = 0;
if (cmbSalesMan.SelectedValue.ToString() != null)
{
InfoSalesMaster.EmployeeId = Convert.ToDecimal(cmbSalesMan.SelectedValue.ToString());
}
else
{
InfoSalesMaster.EmployeeId = 0;
}
decimal decExachangeRateId = BllExchangeRate.ExchangerateViewByCurrencyId(PublicVariables._decCurrencyId);
InfoSalesMaster.ExchangeRateId = decExachangeRateId;
InfoSalesMaster.FinancialYearId = PublicVariables._decCurrentFinancialYearId;
InfoSalesMaster.GrandTotal = Convert.ToDecimal(txtGrandTotal.Text.Trim());
InfoSalesMaster.LrNo = string.Empty;
InfoSalesMaster.Narration = txtNarration.Text.Trim();
InfoSalesMaster.OrderMasterId = 0;
InfoSalesMaster.POS = true;
InfoSalesMaster.PricinglevelId = Convert.ToDecimal(cmbPricingLevel.SelectedValue.ToString());
InfoSalesMaster.QuotationMasterId = 0;
InfoSalesMaster.SalesAccount = Convert.ToDecimal(cmbSalesAccount.SelectedValue.ToString());
InfoSalesMaster.TaxAmount = Convert.ToDecimal(lblTaxTotalAmount.Text);
InfoSalesMaster.TotalAmount = Convert.ToDecimal(txtTotalAmount.Text);
InfoSalesMaster.TransportationCompany = "";
InfoSalesMaster.UserId = PublicVariables._decCurrentUserId;
InfoSalesMaster.VoucherTypeId = DecPOSVoucherTypeId;
if (isAutomatic)
{
InfoSalesMaster.SuffixPrefixId = decPOSSuffixPrefixId;
}
else
{
InfoSalesMaster.SuffixPrefixId = 0;
}
if (isAutomatic)
{
InfoSalesMaster.VoucherNo = strVoucherNo;
}
else
{
InfoSalesMaster.VoucherNo = txtVoucherNo.Text.Trim();
}
InfoSalesMaster.ExtraDate = DateTime.Now;
InfoSalesMaster.Extra1 = string.Empty;
InfoSalesMaster.Extra2 = string.Empty;
BllSalesInvoice.SalesMasterEdit(InfoSalesMaster);
decimal dcAgainstVopucherTypeId = 0;
string strAgainstVoucherNo = "NA";
BllStockPosting.StockPostingDeleteByagainstVoucherTypeIdAndagainstVoucherNoAndVoucherNoAndVoucherType(dcAgainstVopucherTypeId, strAgainstVoucherNo, strVoucherNo, InfoSalesMaster.VoucherTypeId);
BllLedgerPosting.LedgerPostDelete(InfoSalesMaster.VoucherNo, InfoSalesMaster.VoucherTypeId);
removeSalesInvoiceDetails();
SalesInvoiceDetailsEdit();
Messages.UpdatedMessage();
if (objfrmSalesInvoiceRegister != null)
{
if (cbxPrintAfterSave.Checked)
{
SettingsBll BllSettings = new SettingsBll();
if (BllSettings.SettingsStatusCheck("Printer") == "Dot Matrix")
{
PrintForDotMatrix(decSalesMasterId);
}
else
{
Print(decSalesMasterId);
}
}
objfrmSalesInvoiceRegister.gridFill();
}
if (frmSalesReportObj != null)
{
if (cbxPrintAfterSave.Checked)
{
SettingsBll BllSettings = new SettingsBll();
if (BllSettings.SettingsStatusCheck("Printer") == "Dot Matrix")
{
PrintForDotMatrix(decSalesMasterId);
}
else
{
Print(decSalesMasterId);
}
}
frmSalesReportObj.gridFill();
//.........这里部分代码省略.........
示例15: CheckInvalidEntries
/// <summary>
/// Checking the invalid entries of the grid
/// </summary>
/// <param name="e"></param>
public void CheckInvalidEntries(DataGridViewCellEventArgs e)
{
SettingsBll BllSettings = new SettingsBll();
try
{
if (dgvSalesInvoice.CurrentRow != null)
{
if (!isValueChanged)
{
if (dgvSalesInvoice.CurrentRow.Cells["dgvtxtSalesInvoiceProductName"].Value == null || dgvSalesInvoice.CurrentRow.Cells["dgvtxtSalesInvoiceProductName"].Value.ToString().Trim() ==string.Empty)
{
isValueChanged = true;
dgvSalesInvoice.CurrentRow.HeaderCell.Value = "X";
dgvSalesInvoice.CurrentRow.HeaderCell.Style.ForeColor = Color.Red;
}
else if (dgvSalesInvoice.CurrentRow.Cells["dgvtxtSalesInvoiceQty"].Value == null || dgvSalesInvoice.CurrentRow.Cells["dgvtxtSalesInvoiceQty"].Value.ToString().Trim()==string.Empty || Convert.ToDecimal( dgvSalesInvoice.CurrentRow.Cells["dgvtxtSalesInvoiceQty"].Value)==0)
{
isValueChanged = true;
dgvSalesInvoice.CurrentRow.HeaderCell.Value = "X";
dgvSalesInvoice.CurrentRow.HeaderCell.Style.ForeColor = Color.Red;
}
else if (dgvSalesInvoice.CurrentRow.Cells["dgvtxtSalesInvoiceRate"].Value == null || dgvSalesInvoice.CurrentRow.Cells["dgvtxtSalesInvoiceRate"].Value.ToString().Trim() ==string.Empty)
{
isValueChanged = true;
dgvSalesInvoice.CurrentRow.HeaderCell.Value = "X";
dgvSalesInvoice.CurrentRow.HeaderCell.Style.ForeColor = Color.Red;
}
else if (dgvSalesInvoice.CurrentRow.Cells["dgvtxtSalesInvoiceGrossValue"].Value == null || dgvSalesInvoice.CurrentRow.Cells["dgvtxtSalesInvoiceGrossValue"].Value.ToString().Trim() == string.Empty)
{
isValueChanged = true;
dgvSalesInvoice.CurrentRow.HeaderCell.Value = "X";
dgvSalesInvoice.CurrentRow.HeaderCell.Style.ForeColor = Color.Red;
}
else if (dgvSalesInvoice.CurrentRow.Cells["dgvtxtSalesInvoiceAmount"].Value == null || dgvSalesInvoice.CurrentRow.Cells["dgvtxtSalesInvoiceAmount"].Value.ToString().Trim() == string.Empty)
{
isValueChanged = true;
dgvSalesInvoice.CurrentRow.HeaderCell.Value = "X";
dgvSalesInvoice.CurrentRow.HeaderCell.Style.ForeColor = Color.Red;
}
else if (BllSettings.SettingsStatusCheck("AllowZeroValueEntry") == "No" && Convert.ToDecimal(dgvSalesInvoice.CurrentRow.Cells["dgvtxtSalesInvoiceRate"].Value) == 0)
{
isValueChanged = true;
dgvSalesInvoice.CurrentRow.HeaderCell.Value = "X";
dgvSalesInvoice.CurrentRow.HeaderCell.Style.ForeColor = Color.Red;
}
else
{
isValueChanged = true;
dgvSalesInvoice.CurrentRow.HeaderCell.Value = string.Empty;
}
}
isValueChanged = false;
}
}
catch (Exception ex)
{
MessageBox.Show("SI: 54" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}