private void xrTotalPrice_SummaryCalculated(object sender, DevExpress.XtraReports.UI.TextFormatEventArgs e)
        {
            totalWithoutInsurance = 0;
            if (e.Value != null)
            {
                totalWithoutInsurance = Convert.ToDouble(e.Value.ToString());
            }

            insuranceValue = BLL.Order.GetInsuranceValue(_orderID, totalWithoutInsurance);

            e.Text = (insuranceValue + totalWithoutInsurance).ToString("###,###,##0.#0");

            try
            {
                if (_includeInsurance)
                {
                    totalWithoutInsurance = Convert.ToDouble(e.Value.ToString());
                    insuranceValue        = BLL.Order.GetInsuranceValue(_orderID, totalWithoutInsurance);
                    e.Text = (insuranceValue + totalWithoutInsurance).ToString("###,###,##0.#0");
                }
                else
                {
                    insuranceValue        = 0;
                    totalWithoutInsurance = Convert.ToDouble(e.Value.ToString());
                    e.Text = totalWithoutInsurance.ToString("###,###,##0.#0");
                }
            }
            catch
            {
            }
        }
 private void PriceInWords_SummaryCalculated(object sender, DevExpress.XtraReports.UI.TextFormatEventArgs e)
 {
     try
     {
         e.Text = NumberToEnglish.ConvertMoneyToWords(Convert.ToDouble(e.Value.ToString().Replace(",", "")));
     }
     catch
     {
     }
 }
 private void PriceInWords_SummaryCalculated(object sender, DevExpress.XtraReports.UI.TextFormatEventArgs e)
 {
     if (e.Value != null)
     {
         double grandTotal = Convert.ToDouble(e.Value.ToString().Replace(",", ""));
         if (_includeInsurance)
         {
             grandTotal += BLL.Order.GetInsuranceValue(_orderID, grandTotal);
         }
         e.Text = NumberToEnglish.ConvertMoneyToWords(grandTotal);
     }
 }
Beispiel #4
0
 private void tableCell20_SummaryCalculated(object sender, DevExpress.XtraReports.UI.TextFormatEventArgs e)
 {
     //string w = tableCell20.Text.ToString();
     //e.Text = System.TimeSpan.Parse(w).TotalHours.ToString();
     //if (e.SummaryProcess == DevExpress.Data.CustomSummaryProcess.Finalize)
     //{
     //    try
     //    {
     //        string strin_f = ts.TotalHours.ToString();//(0,2) + ":" + ts.Minutes.ToString();
     //        string itog;
     //        // e.TotalValue = strin_f;
     //        if (strin_f.Contains(',') == true)
     //        {
     //            int len = strin_f.IndexOf(',', 0);
     //            if (ts.Minutes.ToString().Length > 1)
     //            {
     //                itog = strin_f.Substring(0, len) + ":" + ts.Minutes.ToString();
     //                e.TotalValue = itog;
     //            }
     //            else
     //            {
     //                itog = strin_f.Substring(0, len) + ":0" + ts.Minutes.ToString();
     //                e.TotalValue = itog;
     //            }
     //        }
     //        else
     //        {
     //            if (ts.Minutes.ToString().Length > 1)
     //            {
     //                itog = strin_f + ":" + ts.Minutes.ToString();
     //                e.TotalValue = itog;
     //            }
     //            else
     //            {
     //                itog = strin_f + ":0" + ts.Minutes.ToString();
     //                e.TotalValue = itog;
     //            }
     //        }
     //    }
     //    catch { }
     //}
 }
Beispiel #5
0
 private void xrInsuranceValue_SummaryCalculated(object sender, DevExpress.XtraReports.UI.TextFormatEventArgs e)
 {
     try
     {
         NumberToEnglish converter = new NumberToEnglish();
         totalWithoutInsurance = Convert.ToDouble(e.Value);
         if (_includeInsurance)
         {
             BLL.Order order = new BLL.Order();
             insuranceValue    = BLL.Order.GetInsuranceValue(_orderID, totalWithoutInsurance);
             e.Text            = insuranceValue.ToString("###,###,##0.#0");
             xrTotalPrice.Text = (insuranceValue + totalWithoutInsurance).ToString();
         }
         else
         {
             insuranceValue    = 0;
             e.Text            = " - ";
             xrTotalPrice.Text = totalWithoutInsurance.ToString();
         }
     }
     catch
     {
     }
 }
Beispiel #6
0
 private void xrTotalPrice_SummaryCalculated(object sender, DevExpress.XtraReports.UI.TextFormatEventArgs e)
 {
 }
Beispiel #7
0
 private void xrInsuranceValue_SummaryCalculated(object sender, DevExpress.XtraReports.UI.TextFormatEventArgs e)
 {
 }
Beispiel #8
0
 private void balacneDetailXrLabel_SummaryCalculated(System.Object sender, DevExpress.XtraReports.UI.TextFormatEventArgs e)
 {
     e.Text = (Convert.ToDouble(e.Value) + Convert.ToDouble(openingBalanceParameter.Value)).ToString("#,##0.00");
 }