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


C# Open_Miracle.DateValidation类代码示例

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


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

示例1: txtStatementFrom_Leave

        /// <summary>
        /// text box StatementFrom leave for change date in date time picker
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void txtStatementFrom_Leave(object sender, EventArgs e)
        {
            try
            {
                DateValidation obj = new DateValidation();
                obj.DateValidationFunction(txtStatementFrom);
                if (txtStatementFrom.Text == string.Empty)
                {
                    txtStatementFrom.Text = PublicVariables._dtCurrentDate.ToString("dd-MMM-yyyy");
                }
                dtpStatementFrom.Value = Convert.ToDateTime(txtStatementFrom.Text);
            }
            catch (Exception ex)
            {

                MessageBox.Show("BR:11" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
开发者ID:JaseelAM,项目名称:OpenMiracle-Three-Tier,代码行数:23,代码来源:frmBankReconciliation.cs

示例2: InitialDateSettings

        /// <summary>
        /// Function for initial date settings
        /// </summary>
        public void InitialDateSettings()
        {
            try
            {
                dtpAgeingDate.Value = PublicVariables._dtToDate;
                dtpAgeingDate.MinDate = PublicVariables._dtFromDate;
                dtpAgeingDate.MaxDate = PublicVariables._dtToDate;

                DateValidation objValidation = new DateValidation();
                objValidation.DateValidationFunction(txtToDate);
                if (txtToDate.Text == string.Empty)
                {
                    txtToDate.Text = PublicVariables._dtToDate.ToString("dd-MMM-yyyy");
                }

            }
            catch (Exception ex)
            {
                MessageBox.Show("AR10:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
开发者ID:JaseelAM,项目名称:OpenMiracle-Three-Tier,代码行数:24,代码来源:frmAgeingReport.cs

示例3: txtToDate_Leave

 /// <summary>
 /// On leave from txtToDate
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void txtToDate_Leave(object sender, EventArgs e)
 {
     try
     {
         DateValidation DateValidationObj = new DateValidation();
         DateValidationObj.DateValidationFunction(txtToDate);
         if (txtToDate.Text == string.Empty)
         {
             txtToDate.Text = PublicVariables._dtToDate.ToString("dd-MMM-yyyy");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("AR20:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
开发者ID:JaseelAM,项目名称:OpenMiracle-Three-Tier,代码行数:21,代码来源:frmAgeingReport.cs

示例4: txtFromDate_Leave

 /// <summary>
 /// For date validation and set the date as text box date
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void txtFromDate_Leave(object sender, EventArgs e)
 {
     try
     {
         DateValidation obj = new DateValidation();
         bool isInvalid = obj.DateValidationFunction(txtFromDate);
         if (!isInvalid)
         {
             txtFromDate.Text = strFromDateToKeep;
         }
         else
         {
             string date = txtFromDate.Text;
             dtpFromDate.Value = Convert.ToDateTime(date);
         }
         dtpToDate.MinDate = Convert.ToDateTime(txtFromDate.Text);
         //dtpToDate.Value = dtpFromDate.Value;
         //txtToDate.Clear();
     }
     catch (Exception ex)
     {
         MessageBox.Show("NFY 16 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
开发者ID:jsoques,项目名称:openmiracle,代码行数:29,代码来源:frmNewFinancialYear.cs

示例5: txtDate_Leave

 /// <summary>
 /// On leave from txtDate, validates date
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void txtDate_Leave(object sender, EventArgs e)
 {
     try
     {
         DateValidation obj = new DateValidation();
         bool isInvalid = obj.DateValidationFunction(txtDate);
         if (!isInvalid)
         {
             txtDate.Text = PublicVariables._dtCurrentDate.ToString("dd-MMM-yyyy");
         }
         string date = txtDate.Text;
         dtpDate.Value = Convert.ToDateTime(date);
     }
     catch (Exception ex)
     {
         MessageBox.Show("SJ:64" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
开发者ID:jsoques,项目名称:openmiracle,代码行数:23,代码来源:frmStockJournal.cs

示例6: txtFromDate_Leave

 /// <summary>
 /// changing Fromdate as per textbox changed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void txtFromDate_Leave(object sender, EventArgs e)
 {
     try
     {
         DateValidation obj = new DateValidation();
         obj.DateValidationFunction(txtFromDate);
         if (txtFromDate.Text == String.Empty)
             txtFromDate.Text = PublicVariables._dtCurrentDate.ToString("dd-MMM-yyyy");
         dtpFromDate.Value = DateTime.Parse(txtFromDate.Text);
     }
     catch (Exception ex)
     {
         MessageBox.Show("SPS17" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
开发者ID:JaseelAM,项目名称:OpenMiracle-Three-Tier,代码行数:20,代码来源:frmSuffixPrefixSettings.cs

示例7: 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)
//.........这里部分代码省略.........
开发者ID:JaseelAM,项目名称:OpenMiracle-Three-Tier,代码行数:101,代码来源:frmTrialBalance.cs

示例8: dgvJournalVoucher_CellValueChanged


//.........这里部分代码省略.........
                                }
                            }

                            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"]);
                                    }
                                    dtblPartyBalance.Rows.RemoveAt(inJ);
                                    inJ--;
                                }
                            }
                            dgvJournalVoucher.Rows[e.RowIndex].Cells["dgvtxtAmount"].Value = string.Empty;

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

                    //-----------------------------------Chequedate validation----------------------------------//
                    DateValidation obj = new DateValidation();
                    TextBox txtDate1 = new TextBox();
                    if (dgvJournalVoucher.Rows[e.RowIndex].Cells["dgvtxtChequeDate"].Value != null && dgvJournalVoucher.Rows[e.RowIndex].Cells["dgvtxtChequeDate"].Value.ToString() != string.Empty)
                    {
                        txtDate1.Text = dgvJournalVoucher.Rows[e.RowIndex].Cells["dgvtxtChequeDate"].Value.ToString();
                        bool isInvalid = obj.DateValidationFunction(txtDate1);
                        if (!isInvalid)
                        {
                            dgvJournalVoucher.Rows[e.RowIndex].Cells["dgvtxtChequeDate"].Value = PublicVariables._dtCurrentDate.ToString("dd-MMM-yyyy");
                        }
                        else
                        {
                            dgvJournalVoucher.Rows[e.RowIndex].Cells["dgvtxtChequeDate"].Value = txtDate1.Text;
                        }
                    }
                    //=========================================================================================//
                    //---------------------check column missing---------------------------------//

                    CheckColumnMissing(e);

                    //==========================================================================//

                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("JV50:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
开发者ID:jsoques,项目名称:openmiracle,代码行数:101,代码来源:frmJournalVoucher.cs

示例9: txtTodate_TextChanged

 /// <summary>
 /// Date validation
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void txtTodate_TextChanged(object sender, EventArgs e)
 {
    
     try
     {
        
         if (txtTodate.Text == string.Empty && !txtTodate.Focused)
         {
             DateValidation obj = new DateValidation();
             bool isInvalid = obj.DateValidationFunction(txtTodate);
             if (!isInvalid)
             {
                 txtTodate.Text = PublicVariables._dtCurrentDate.ToString("dd-MMM-yyyy");
             }
             string date = txtTodate.Text;
             dtpTodate.Value = Convert.ToDateTime(date);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("POREG10:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
开发者ID:jsoques,项目名称:openmiracle,代码行数:28,代码来源:frmPDCPayableRegister.cs

示例10: txtDate_Leave

        /// <summary>
        /// Date Validation
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void txtDate_Leave(object sender, EventArgs e)
        {
            try
            {
                DateValidation obj = new DateValidation();
                bool isValidate = obj.DateValidationFunction(txtDate);

                if (!isValidate)
                {
                    txtDate.Text = PublicVariables._dtCurrentDate.ToString("dd-MMM-yyyy");
                }
                //---for change date in Date time picker----//

                dtpDate.Value = Convert.ToDateTime(txtDate.Text);

                if (!isEditmode)//Re fill
                {
                    VoucherNumberGeneration();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("DSV35:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
开发者ID:JaseelAM,项目名称:OpenMiracle-Three-Tier,代码行数:30,代码来源:frmDailySalaryVoucher.cs

示例11: txtSalaryDate_Leave

        /// <summary>
        /// Date vakidation and fills Datagridview
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void txtSalaryDate_Leave(object sender, EventArgs e)
        {
            DailySalaryVoucherBll BllDailySalaryVoucher = new DailySalaryVoucherBll();
            try
            {
                DateValidation obj = new DateValidation();
                obj.DateValidationFunction(txtSalaryDate);
                if (txtSalaryDate.Text == string.Empty)
                {
                    txtSalaryDate.Text = PublicVariables._dtCurrentDate.ToString("dd-MMM-yyyy");
                }
                //---for change date in Date time picker----//
                string strdate = txtSalaryDate.Text;
                dtpSalaryDate.Value = Convert.ToDateTime(strdate.ToString());

                List<DataTable> listObj = new List<DataTable>();

                listObj = BllDailySalaryVoucher.DailySalaryVoucherDetailsGridViewAll(txtSalaryDate.Text.ToString(), isEditmode, strVoucherNoforEdit);
                dgvDailySalaryVoucher.DataSource = listObj[0];
            }
            catch (Exception ex)
            {
                MessageBox.Show("DSV30:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
开发者ID:JaseelAM,项目名称:OpenMiracle-Three-Tier,代码行数:30,代码来源:frmDailySalaryVoucher.cs

示例12: Gridfill

        /// <summary>
        /// Function to fill Datagridview
        /// </summary>
        public void Gridfill()
        {
            try
            {
                if (!isFormLoad)
                {
                    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");
                    Font newFont = new Font(dgvProfitAndLoss.Font, FontStyle.Bold);
                    CurrencyInfo InfoCurrency = new CurrencyInfo();
                    CurrencyBll BllCurrency = new CurrencyBll();
                    InfoCurrency = BllCurrency.CurrencyView(1);
                    int inDecimalPlaces = InfoCurrency.NoOfDecimalPlaces;
                    dgvProfitAndLoss.Rows.Clear();
                    FinancialStatementBll bllFinancialStatement = new FinancialStatementBll();

                    DataTable dtblFinancial = new DataTable();
                    DataSet DsetProfitAndLoss = new DataSet();
                    SettingsInfo infoSettings = new SettingsInfo();
                    SettingsBll BllSettings = new SettingsBll();
                    //---------check  calculation method
                    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";
                    }
                    DsetProfitAndLoss = bllFinancialStatement.ProfitAndLossAnalysis(DateTime.Parse(txtFromDate.Text), DateTime.Parse(txtToDate.Text));
                    //---- Opening Stock
                    dgvProfitAndLoss.Rows.Add();
                    decimal dcOpeningStock = bllFinancialStatement.StockValueGetOnDate(DateTime.Parse(txtFromDate.Text), DateTime.Parse(txtToDate.Text), calculationMethod, true, false);
                    dgvProfitAndLoss.Rows[dgvProfitAndLoss.Rows.Count - 1].Cells["dgvtxtExpenses"].Value = "Opening Stock";
                    if (dcOpeningStock > 0)
                    {
                        dgvProfitAndLoss.Rows[dgvProfitAndLoss.Rows.Count - 1].Cells["dgvtxtAmount1"].Value = Math.Round(dcOpeningStock, inDecimalPlaces);
                    }
                    else
                    {
                        dgvProfitAndLoss.Rows[dgvProfitAndLoss.Rows.Count - 1].Cells["dgvtxtAmount1"].Value = -(Math.Round(dcOpeningStock, inDecimalPlaces));
                    }
                    //Closing Stock
                    decimal dcClosingStock = 0;
                    dgvProfitAndLoss.Rows[dgvProfitAndLoss.Rows.Count - 1].Cells["dgvtxtIncome"].Value = "Closing Stock";
                    dcClosingStock = bllFinancialStatement.StockValueGetOnDate(DateTime.Parse(txtToDate.Text), calculationMethod, false, false);
                    dgvProfitAndLoss.Rows[dgvProfitAndLoss.Rows.Count - 1].Cells["dgvtxtAmount2"].Value = Math.Round(dcClosingStock, inDecimalPlaces);
                    /// ---Purchase Account  - Debit
                    dtblFinancial = new DataTable();
                    dtblFinancial = DsetProfitAndLoss.Tables[0];
                    dgvProfitAndLoss.Rows.Add();
                    dgvProfitAndLoss.Rows[dgvProfitAndLoss.Rows.Count - 1].Cells["dgvtxtExpenses"].Value = "Purchase Accounts";
                    decimal dcPurchaseAccount = 0m;
                    if (dtblFinancial.Rows.Count > 0)
                    {
                        foreach (DataRow rw in dtblFinancial.Rows)
                        {
                            decimal dcBalance = decimal.Parse(rw["Debit"].ToString().ToString());
                            dcPurchaseAccount += dcBalance;
                        }
                        dgvProfitAndLoss.Rows[dgvProfitAndLoss.Rows.Count - 1].Cells["dgvtxtGroupId1"].Value = "11";
                    }
                    dgvProfitAndLoss.Rows[dgvProfitAndLoss.Rows.Count - 1].Cells["dgvtxtAmount1"].Value = dcPurchaseAccount.ToString();
                    //---Sales Account  -Credit
                    dtblFinancial = new DataTable();
                    dtblFinancial = DsetProfitAndLoss.Tables[1];
                    dgvProfitAndLoss.Rows[dgvProfitAndLoss.Rows.Count - 1].Cells["dgvtxtIncome"].Value = "Sales Accounts";
                    decimal dcSalesAccount = 0m;
                    if (dtblFinancial.Rows.Count > 0)
                    {
                        foreach (DataRow rw in dtblFinancial.Rows)
                        {
                            decimal dcBalance = decimal.Parse(rw["Credit"].ToString().ToString());
                            dcSalesAccount += dcBalance;
                        }
                        dgvProfitAndLoss.Rows[dgvProfitAndLoss.Rows.Count - 1].Cells["dgvtxtGroupId2"].Value = "10";
                    }
                    dgvProfitAndLoss.Rows[dgvProfitAndLoss.Rows.Count - 1].Cells["dgvtxtAmount2"].Value = dcSalesAccount.ToString();
                    dgvProfitAndLoss.Rows.Add();
                    dgvProfitAndLoss.Rows.Add();
//.........这里部分代码省略.........
开发者ID:JaseelAM,项目名称:OpenMiracle-Three-Tier,代码行数:101,代码来源:frmProfitAndLoss.cs

示例13: txtBooksBegining_Leave

 /// <summary>
 /// On leave from txtBooksBegining
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void txtBooksBegining_Leave(object sender, EventArgs e)
 {
     try
     {
         DateValidation obj = new DateValidation();
         bool isInvalid = obj.DateValidationFunction(txtBooksBegining);
         if (!isInvalid)
         {
             txtBooksBegining.Text = System.DateTime.Now.ToString("dd-MMM-yyyy");
         }
         string date = txtBooksBegining.Text;
         dtpBooksBegining.Value = Convert.ToDateTime(date);
     }
     catch (Exception ex)
     {
         MessageBox.Show("CR22:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
开发者ID:jsoques,项目名称:openmiracle,代码行数:23,代码来源:frmCompanyCreation.cs

示例14: btnRefresh_Click

 /// <summary>
 /// On 'Search' button click fills datagridview
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnRefresh_Click(object sender, EventArgs e)
 {
     try
     {
         DateValidation ObjValidation = new DateValidation();
         ObjValidation.DateValidationFunction(txtToDate);
         if (Convert.ToDateTime(txtToDate.Text) < Convert.ToDateTime(txtFromDate.Text))
         {
             MessageBox.Show("To-Date should be greater than From-Date", "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
             txtToDate.Text = PublicVariables._dtCurrentDate.ToString("dd-MMM-yyyy");
             txtFromDate.Text = PublicVariables._dtCurrentDate.ToString("dd-MMM-yyyy");
             DateTime dt;
             DateTime.TryParse(txtToDate.Text, out dt);
             dtpToDate.Value = dt;
             dtpFromDate.Value = dt;
         }
         GridFill();
     }
     catch (Exception ex)
     {
         MessageBox.Show("DNREG10:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
开发者ID:JaseelAM,项目名称:OpenMiracle-Three-Tier,代码行数:28,代码来源:frmDeliveryNoteRegister.cs

示例15: txtVoucherDateTo_Leave

 /// <summary>
 /// Date validation
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void txtVoucherDateTo_Leave(object sender, EventArgs e)
 {
     try
     {
         DateValidation objDateValidation = new DateValidation();
         objDateValidation.DateValidationFunction(txtVoucherDateTo);
         if (txtVoucherDateTo.Text == string.Empty)
         {
             txtVoucherDateTo.Text = PublicVariables._dtCurrentDate.ToString("dd-MMM-yyyy");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("DSR16" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
开发者ID:jsoques,项目名称:openmiracle,代码行数:21,代码来源:frmDailySalaryRegister.cs


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