示例#1
0
        private bool Report_SaleWeightBalanceByYear(DateTime strFromDate)
        {
            try
            {
                DataTable dt = new DataTable();
                DataSet   ds = SQLReport.Rpt_SaleWeightBalanceByYear(strFromDate, sCustomerId);
                dt = ds.Tables[0];

                Rpt_SaleWeightBalance report = new Rpt_SaleWeightBalance
                {
                    DataSource = dt,
                    DataMember = "Datatable1"
                };

                report.lblSearchText.Text = strFromDate.ToString("ช่วงปี yyyy", SQLData._cultureThInfo);

                PrintReport(report);

                return(true);
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message);
                return(false);
            }
        }
示例#2
0
        // รายงานยอดคงเหลือขายยางพารา
        private bool Report_SaleWeightBalanceByDate(DateTime strFromDate, DateTime strToDate)
        {
            try
            {
                DataTable dt = new DataTable();
                DataSet   ds = SQLReport.Rpt_SaleWeightBalanceBydate(strFromDate, strToDate, sCustomerId);
                dt = ds.Tables[0];

                Rpt_SaleWeightBalance report = new Rpt_SaleWeightBalance
                {
                    DataSource = dt,
                    DataMember = "Datatable1"
                };

                report.lblSearchText.Text = "ระหว่าง " +
                                            strFromDate.ToString("วันdddd ที่ dd MMMM yyyy hh:mm", SQLData._cultureThInfo) +
                                            " ถึง " + strToDate.ToString("วันdddd ที่ dd MMMM yyyy hh:mm", SQLData._cultureThInfo);
                PrintReport(report);

                return(true);
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message);
                return(false);
            }
        }