Esempio n. 1
0
        private void xrBrutTotal_PrintOnPage(object sender, PrintOnPageEventArgs e)
        {
            var ds               = (System.Data.DataSet) this.DataSource;
            var table            = ds.Tables["TDeclaration"];
            var catNo            = Parameters["ParamCategorie"].Value;
            var filterExpression = string.Format(CultureInfo.InvariantCulture, "[Page] <= {0} And CategorieNo ={1}  ",
                                                 e.PageIndex + 1, catNo);
            object  oBrut1       = table.Compute("SUM(Brut1)", filterExpression);
            object  oBrut2       = table.Compute("SUM(Brut2)", filterExpression);
            object  oBrut3       = table.Compute("SUM(Brut3)", filterExpression);
            decimal montantBrut1 = 0;
            decimal montantBrut2 = 0;
            decimal montantBrut3 = 0;

            if (oBrut1 != null)
            {
                System.Decimal.TryParse(oBrut1.ToString(), out montantBrut1);
            }
            if (oBrut2 != null)
            {
                System.Decimal.TryParse(oBrut2.ToString(), out montantBrut2);
            }
            if (oBrut3 != null)
            {
                System.Decimal.TryParse(oBrut3.ToString(), out montantBrut3);
            }
            ((XRLabel)sender).Text = string.Format("{0:0.000}", montantBrut3 + montantBrut2 + montantBrut1);
        }
Esempio n. 2
0
 private void xrLabel10_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     if (e.PageIndex != e.PageCount - 1)
     {
         e.Cancel = true;
     }
 }
Esempio n. 3
0
 private void xrTableCell18_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     if ((sender as XRTableCell).Text.ToLower() == "false")
     {
         (sender as XRTableCell).Text = " ";
     }
 }
Esempio n. 4
0
 private void xrTableCell6_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     if (!string.IsNullOrEmpty((sender as XRTableCell).Text))
     {
         (sender as XRTableCell).Text = Convert.ToDouble((sender as XRTableCell).Text).ToString("N2");
     }
 }
Esempio n. 5
0
 private void lbCategoryName_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     if (IsDisposed || categoryStartPageID != null)
     {
         return;
     }
     categoryStartPageID = Pages[e.PageIndex].ID;
 }
Esempio n. 6
0
 private void xrLabel6_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     //    if (GetCurrentColumnValue("xrLabel6") == null)
     //    {
     //        XRLabel label = (XRLabel)sender;
     //        label.Text = "0";
     //        xrLabel6.Text = "0";
     //    }
 }
        private void xrLabel3_PrintOnPage(object sender, PrintOnPageEventArgs e)
        {
            // Obtain the current page number.
            string s = (e.PageIndex + 1).ToString();

            // Set the label's text and bookmark (this label is located on the PageHeader
            // band, therefore it will show a bookmark for every report page).
            ((XRLabel)sender).Bookmark += s;
            ((XRLabel)sender).Text     += s;
        }
Esempio n. 8
0
        private void xrTableCell4_PrintOnPage(object sender, PrintOnPageEventArgs e)
        {
            //if (!string.IsNullOrEmpty((sender as XRTableCell).Text))
            //{

            //    (sender as XRTableCell).Text = Convert.ToDouble((sender as XRTableCell).Text).ToString("N0");


            //}
        }
Esempio n. 9
0
        private void xrTableRow2_PrintOnPage(object sender, PrintOnPageEventArgs e)
        {
            var columnTitle1 = sender as XRTableCell;

            oBRPayrolls.Add(new OBRPayrollViewModel()
            {
                PageIndex = e.PageIndex,
                //ColumnTitle2 = columnTitle1?.Value?.ToDecimal(),
            });
        }
Esempio n. 10
0
 private void xrLabel31_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     if (string.IsNullOrEmpty((sender as XRLabel).Text))
     {
         (sender as XRLabel).Text = time(0, true);
     }
     else
     {
         (sender as XRLabel).Text = time(Convert.ToInt32((sender as XRLabel).Text), true);
     }
 }
Esempio n. 11
0
 private void txtketluan2_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     //if (e.PageIndex > 0)
     //{
     //    xrTable4.Visible = true;
     //}
     //else
     //{
     //    xrTable4.Visible = false;
     //}
 }
Esempio n. 12
0
        private void xrTableCell12_PrintOnPage(object sender, PrintOnPageEventArgs e)
        {
            var columnTitle2 = sender as XRTableCell;

            oBRPayrolls.Add(new OBRPayrollViewModel()
            {
                PageIndex = e.PageIndex,
                //ColumnTitle2 = columnTitle2?.Text?.ToDecimal(),
            });
            columnTitle2.Text = columnTitle2?.Text?.ToDecimal().ToString("#,##.00##");
        }
 private void xrLabel1_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     if (e.PageCount > 0)
     {
         // Check if the control is printed on the first page.
         if (e.PageIndex == 0)
         {
             // Cancels the control's printing.
             e.Cancel = true;
         }
     }
 }
Esempio n. 14
0
        private void xrTableCell13_PrintOnPage(object sender, PrintOnPageEventArgs e)
        {
            var total = sender as XRTableCell;


            oBRPayrolls.Add(new OBRPayrollViewModel()
            {
                PageIndex = e.PageIndex,
                //     Total = total?.Text?.ToDecimal(),
            });
            total.Text = total?.Text?.ToDecimal().ToString("#,##.00##");
        }
Esempio n. 15
0
 private void colGrandTotal_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     if (sender is XRTableCell cell)
     {
         cell.Visible = e.PageIndex == (Pages.Count() - 1) ? true : false;
         // colGrandTotalTitle1.Text = oBRPayrolls.Sum(x => x.ColumnTitle1)?.ToString("#,##.00##");
         //colGrandTotalTitle2.Text = oBRPayrolls.Sum(x => x.ColumnTitle2)?.ToString("#,##.00##");
         //colGrandTotal.Text = oBRPayrolls.Sum(x => x.Total)?.ToString("#,##.00##");
         //if (cell.Name == "colGrandTotalLabel")
         //    cell.Visible = e.PageCount == Pages.Count() ? true : false;
     }
 }
Esempio n. 16
0
 private void txtCustomerNAme_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     try
     {
         if (e.PageIndex > 0)
         {
             txtCustomerAddress.Visible = false;
             txtCustomerNAme.Visible    = false;
         }
     }
     catch (Exception ex) {}
 }
 private void XrPageInfo2_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     //    if (e.PageIndex + 1 < e.PageCount)
     //        e.PageIndex = e.PageIndex - 1;
     //}
     //    void ToBeContinueLabel_PrintOnPage(object sender, PrintOnPageEventArgs e)
     //    {
     //        if (e.PageIndex + 1 < e.PageCount)
     //            ((XRLabel)sender).Text = "To be continued...";
     //        else
     //            ((XRLabel)sender).Text = "Your text for the last page";
     //    }
 }
Esempio n. 18
0
 private void xrLabel1_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     // Check if the label is printed on the last page.
     if (e.PageIndex == e.PageCount - 1)
     {
         // Set its text.
         ((XRLabel)sender).Text = "Total";
     }
     else
     {
         ((XRLabel)sender).Text = "Total à reporter";
     }
 }
Esempio n. 19
0
 private void xrLabel28_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     try
     {
         if (!string.IsNullOrEmpty((sender as XRLabel).Text))
         {
             (sender as XRLabel).Text = Convert.ToDouble((sender as XRLabel).Text).ToString("N2");
         }
     }
     catch
     {
     }
 }
Esempio n. 20
0
 private void txtketqualan_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     //XRLabel lbl = (XRLabel)sender;
     //int i = e.PageIndex;
     //if (e.PageIndex > 0)
     //{
     //    xrTable4.Visible = true;
     //    this.xrTable4.LocationFloat = new DevExpress.Utils.PointFloat(3.000005F, 0F);
     //    this.piclan1.LocationFloat = new DevExpress.Utils.PointFloat(50.60675F, 36.6F);
     //    this.piclan2.LocationFloat = new DevExpress.Utils.PointFloat(369.5F, 36.6F);
     //}
     //else
     //    xrTable4.Visible = false;
 }
Esempio n. 21
0
        private void lblCUSTOMER_PrintOnPage(object sender, PrintOnPageEventArgs e)
        {
            try
            {
                DevExpress.Data.Browsing.DataBrowser browser = this.fDataContext[this.DataSource, this.DataMember];
                if (browser.HasLastPosition)
                {
                    browser.Position = -1;
                }
                else
                {
                    browser.Position++;
                }

                if (e.PageIndex != CUSTOMERpageidx)
                {
                    CUSTOMERpageidx = e.PageIndex;
                    e.Cancel        = false;
                }
                else
                {
                    object groupCUSTOMERprev   = this.GetPreviousColumnValue("CUSTOMER");
                    object groupPRODUCT_NOprev = this.GetPreviousColumnValue("PRODUCT_NO");

                    object groupCUSTOMERcurr   = this.GetCurrentColumnValue("CUSTOMER");
                    object groupPRODUCT_NOcurr = this.GetCurrentColumnValue("PRODUCT_NO");


                    if (groupCUSTOMERprev.ToString() == groupCUSTOMERcurr.ToString())
                    {
                        if (groupPRODUCT_NOprev.ToString() == groupPRODUCT_NOcurr.ToString())
                        {
                            e.Cancel = true;
                        }
                        else
                        {
                            e.Cancel = false;
                        }
                    }
                    else
                    {
                        e.Cancel = false;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 22
0
        private void xrLabelEEIPromisedDueDate_PrintOnPage(object sender, PrintOnPageEventArgs e)
        {
            string Date = xrLabelEEIPromisedDueDate.Text;

            if (Date == "")
            {
                return;
            }

            int i = Date.IndexOf(" ");

            Date = Date.Remove(i); // removes time

            xrLabelEEIPromisedDueDate.Text = Date;
        }
Esempio n. 23
0
 void cont_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     try
     {
         if (e.PageIndex > 0)
         {
             xrLabel10.Visible = false;
             xrLabel11.Visible = false;
         }
     }
     catch (Exception ex)
     {
         Utility.ShowError(ex);
     }
 }
Esempio n. 24
0
        private void xrLabelEAU_PrintOnPage(object sender, PrintOnPageEventArgs e)
        {
            string EAU = xrLabelEAU.Text;

            if (EAU == "")
            {
                return;
            }

            EAU = EAU.Remove(0, 1); // removes dollar sign

            int i = EAU.IndexOf(".");

            EAU = EAU.Remove(i); // removes decimals

            xrLabelEAU.Text = EAU;
        }
Esempio n. 25
0
 private void tbDiscount_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     Double dValue = 0;
     try
     {
         if (DetailReport.GetCurrentColumnValue("Discount") != DBNull.Value)
         {
             dValue = Convert.ToDouble(DetailReport.GetCurrentColumnValue("Discount"));
         }
         if (dValue <= 0)
         {                    
             tbDiscount.Visible = false;
             tbDisText.Visible = false;
             tbDiseuro.Visible = false;
         }
     }
     catch (Exception ex)
     {
         Utility.ShowError(ex);
     }
 }
Esempio n. 26
0
        private void lblProductName_PrintOnPage(object sender, PrintOnPageEventArgs e)
        {
            try
            {
                if (e.PageIndex != ProductNamepageidx)
                {
                    ProductNamepageidx = e.PageIndex;
                    e.Cancel           = false;
                }
                else
                {
                    object groupCUSTOMERprev   = this.GetPreviousColumnValue("CUSTOMER");
                    object groupPRODUCT_NOprev = this.GetPreviousColumnValue("PRODUCT_NO");

                    object groupCUSTOMERcurr   = this.GetCurrentColumnValue("CUSTOMER");
                    object groupPRODUCT_NOcurr = this.GetCurrentColumnValue("PRODUCT_NO");


                    if (groupCUSTOMERprev.ToString() == groupCUSTOMERcurr.ToString())
                    {
                        if (groupPRODUCT_NOprev.ToString() == groupPRODUCT_NOcurr.ToString())
                        {
                            e.Cancel = true;
                        }
                        else
                        {
                            e.Cancel = false;
                        }
                    }
                    else
                    {
                        e.Cancel = false;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 27
0
        private void xrLabelLTAYear1_PrintOnPage(object sender, PrintOnPageEventArgs e)
        {
            string Percentage = xrLabelLTAYear1.Text;

            if (Percentage == "")
            {
                return;
            }

            int i = Percentage.IndexOf(".");

            if (i > 0)
            {
                Percentage = Percentage.Remove(i);
            }

            if (Percentage == "0")
            {
                Percentage = "";
            }

            xrLabelLTAYear1.Text = Percentage;
        }
Esempio n. 28
0
        private void xrPage_PrintOnPage(object sender, PrintOnPageEventArgs e)
        {
            string curMadt = (sender as XRLabel).Tag.ToString();

            if (curMadt == lastMadt)
            {
                iPageNumber += 1;
            }
            else
            {
                iPageNumber = 1;
            }
            curMadt = lastMadt;

            if (iPageNumber > e.PageIndex + 1)
            {
                (sender as XRLabel).Text = "Trang: " + (e.PageIndex + 1).ToString();
            }
            else
            {
                (sender as XRLabel).Text = "Trang: " + iPageNumber.ToString();
            }
        }
Esempio n. 29
0
 private void xrPage_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     (sender as XRLabel).Text = "Trang: " + (e.PageIndex + 1).ToString();
 }
Esempio n. 30
0
 private void xrtcSaldoVigenteGrupo_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     ColorTexto(sender);
 }
Esempio n. 31
0
 private void xrtcSaldoVencidoGrupo7_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     ColorTexto(sender);
 }
Esempio n. 32
0
 private void colTotalTitle2_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     //var sum = oBRPayrolls.Where(x => x.PageIndex == e.PageIndex).Sum(x => x.ColumnTitle2);
     //colTotalTitle2.Text = sum?.ToString("#,##.00##");
 }
Esempio n. 33
0
  private void xrCheckBox1_PrintOnPage(object sender, PrintOnPageEventArgs e)
  {
       
         
 
  }
 private void txtAI_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
     //if (theclint == null) return;
     //txtAI.Text = theclient.RS;
 }
Esempio n. 35
0
 private void xrLabel9_PrintOnPage(object sender, PrintOnPageEventArgs e)
 {
 }