예제 #1
0
        public DetailReport GetDetailReport(List <Person> allPersons, List <Query> allQueries)
        {
            var detailReport = new DetailReport();

            detailReport.AllPersons = allPersons;
            detailReport.Row        = GetDetailReportRow(allPersons, allQueries);

            detailReport.Summary = GetSummaryRow(allPersons, allQueries);

            return(detailReport);
        }
예제 #2
0
 private void xrLabel42_SummaryRowChanged(object sender, EventArgs e)
 {
     try
     {
         if (DetailReport.GetCurrentColumnValue("FinalGB") != DBNull.Value)
             totalResult += Convert.ToDouble(DetailReport.GetCurrentColumnValue("FinalGB"));
     }
     catch (Exception ex)
     {
         Utility.ShowError(ex);
     }
 }
예제 #3
0
 private void xrLabel16_SummaryRowChanged(object sender, EventArgs e)
 {
     try
     {
         if (DetailReport.GetCurrentColumnValue("Quantity") != DBNull.Value)
         {
             totalUnits += Convert.ToDouble(DetailReport.GetCurrentColumnValue("Quantity"));
         }
     }
     catch (Exception ex)
     {
         Utility.ShowError(ex);
     }
 }
예제 #4
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);
     }
 }
예제 #5
0
 private void lblGroupSum_SummaryRowChanged(object sender, EventArgs e)
 {
     try
     {
         string stTemp = Convert.ToString(DetailReport.GetCurrentColumnValue("FinalGB"));
         double dSum   = 0;
         double.TryParse(stTemp, out dSum);
         string stPKZ = Convert.ToString(DetailReport.GetCurrentColumnValue("PositionKZ"));
         int    i     = 0;
         if (int.TryParse(Convert.ToString(DetailReport.GetCurrentColumnValue("DetailKZ")), out i) && i == 0)
         {
             if (stPKZ != "A")
             {
                 if (stPKZ != "E")
                 {
                     GroupSum        += dSum;
                     IsNormalSubtitle = true;
                 }
             }
             AlternateSum += dSum;
         }
     }
     catch (Exception ex) { }
 }
예제 #6
0
        private void initData()
        {
            switch (mode)
            {
            case 0:
                break;

            case 1:
                if (ds1 != null)
                {
                    DetailReport detailRPT = new DetailReport();
                    detailRPT.DataSource = ds1;
                    this.Text            = "Bao cao chi tiet";
                    this.printingSystem1.ClearContent();
                    Invalidate();
                    Update();
                    detailRPT.PrintingSystem = printingSystem1;
                    detailRPT.CreateDocument();
                }
                break;

            case 2:
                if (ds2 != null)
                {
                    TienVonReport rpt = new TienVonReport();
                    rpt.DataSource = ds2;
                    this.Text      = "Báo cáo tiền vốn";
                    this.printingSystem1.ClearContent();
                    Invalidate();
                    Update();
                    rpt.PrintingSystem = printingSystem1;
                    rpt.CreateDocument();
                }
                break;

            case 3:
                if (ds3 != null)
                {
                    TonKhoReport rpt = new TonKhoReport();
                    rpt.DataSource = ds3;
                    this.Text      = "Báo cáo tồn kho";
                    this.printingSystem1.ClearContent();
                    Invalidate();
                    Update();
                    rpt.PrintingSystem = printingSystem1;
                    rpt.CreateDocument();
                }
                break;

            case 4:
                if (ds4 != null)
                {
                    Hoadon rpt = new Hoadon();
                    rpt.DataSource = ds4;
                    this.Text      = "Hóa đơn";
                    this.printingSystem1.ClearContent();
                    Invalidate();
                    Update();
                    rpt.PrintingSystem = printingSystem1;
                    rpt.CreateDocument();
                }
                break;

            case 5:
                if (ds5 != null)
                {
                    DetailReportDSBH rpt = new DetailReportDSBH();
                    rpt.DataSource = ds5;
                    this.Text      = "Doanh số bán hàng";
                    this.printingSystem1.ClearContent();
                    Invalidate();
                    Update();
                    rpt.PrintingSystem = printingSystem1;
                    rpt.CreateDocument();
                }
                break;

            case 6:
                if (ds6 != null)
                {
                    ThongKeHoaDon rpt = new ThongKeHoaDon();
                    rpt.DataSource = ds6;
                    this.Text      = "Thống kê hóa đơn xuất";
                    this.printingSystem1.ClearContent();
                    Invalidate();
                    Update();
                    rpt.PrintingSystem = printingSystem1;
                    rpt.CreateDocument();
                }
                break;

            case 7:
                if (ds7 != null)
                {
                    Hoadonbep rpt = new Hoadonbep();
                    rpt.DataSource = ds7;
                    this.Text      = "Phiếu gọi món";
                    this.printingSystem1.ClearContent();
                    Invalidate();
                    Update();
                    rpt.PrintingSystem = printingSystem1;
                    rpt.CreateDocument();
                }
                break;

            case 8:
                if (ds8 != null)
                {
                    DetailThongKeVanDe rpt = new DetailThongKeVanDe();
                    rpt.DataSource = ds8;
                    this.Text      = "Thống kê hóa đơn xuất";
                    this.printingSystem1.ClearContent();
                    Invalidate();
                    Update();
                    rpt.PrintingSystem = printingSystem1;
                    rpt.CreateDocument();
                }
                break;

            case 9:
                if (ds7 != null)
                {
                    XuatKho rpt = new XuatKho();
                    rpt.DataSource = ds7;
                    this.Text      = "Phiếu Xuất Kho";
                    this.printingSystem1.ClearContent();
                    Invalidate();
                    Update();
                    rpt.PrintingSystem = printingSystem1;
                    rpt.CreateDocument();
                }
                break;

            default:
                break;
            }
        }
        private void Detail1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            string strN_SQUARE   = DetailReport.GetCurrentColumnValue("N_SQUARE").ToString();
            string strN_TRIANGLE = DetailReport.GetCurrentColumnValue("N_TRIANGLE").ToString();

            //N_SQUARE
            if (!string.IsNullOrEmpty(strN_SQUARE))
            {
                xrVN_SQUARE.Text = strN_SQUARE;

                xrSN_SQUARE.Visible = true;
                xrVN_SQUARE.Visible = true;
            }
            else
            {
                xrSN_SQUARE.Visible = false;
                xrVN_SQUARE.Visible = false;
            }

            //N_TRIANGLE
            if (!string.IsNullOrEmpty(strN_TRIANGLE))
            {
                xrVN_TRIANGLE.Text = strN_TRIANGLE;

                xrSN_TRIANGLE.Visible = true;
                xrVN_TRIANGLE.Visible = true;
            }
            else
            {
                xrSN_TRIANGLE.Visible = false;
                xrVN_TRIANGLE.Visible = false;
            }

            //if (this.paramPRODUCTION_TYPE.Value.Equals("P"))
            //{
            //    xrTableCell1.Text = "PRESS";
            //    xrTableCell5.Text = @"100%";
            //}
            //else
            //{
            //    xrTableCell1.Text = "INJ";
            //    xrTableCell5.Text = "ELC";
            //}

            string processArr = this.GetCurrentColumnValue("PROCESS_SEQ").ToString();

            string[] lastViewArr = Regex.Split(processArr, @",");
            if (lastViewArr.Length == 5)
            {
                if (lastViewArr[0] == "N")
                {
                    cellINJ.BackColor = Color.Black;
                }

                if (lastViewArr[1] == "N")
                {
                    cellTRM.BackColor = Color.Black;
                }

                if (lastViewArr[2] == "N")
                {
                    cellELC.BackColor = Color.Black;
                }

                if (lastViewArr[3] == "N")
                {
                    cellPRE.BackColor = Color.Black;
                }

                if (lastViewArr[4] == "N")
                {
                    cellQC.BackColor = Color.Black;
                }
            }

            bool showPageInfo = false;

            if (DetailReport.CurrentRowIndex == 0)
            {
                showPageInfo = true;
            }
            else if ((DetailReport.CurrentRowIndex % 10) == 0)
            {
                showPageInfo = true;
            }
            else
            {
                showPageInfo = false;
            }

            this.xpiPageInfo.Visible   = showPageInfo;
            this.xpiPageInfo.LocationF = new PointF(10F, 553.85F);
            //string srNo = DetailReport.GetCurrentColumnValue("SERIAL_NO").ToString();
            //imgBarcode.Image = UtilityBLL.QRCode_Encode(srNo);
        }
예제 #8
0
 private void xrLabel1_SummaryRowChanged(object sender, EventArgs e)
 {
     profitSum += Convert.ToDouble(DetailReport.GetCurrentColumnValue("Profit"));
 }