예제 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rpt_ChkDoituong01 rpt = new rpt_ChkDoituong01();

            rpt.Site = this.Site;
            return(rpt);
        }
예제 #2
0
        private void btnOK_Click(object sender, RoutedEventArgs e)
        {
            ClsServer cls = new ClsServer();

            try
            {
                cls.ClsConnect();
                int      thamso = 4;
                string[] bien   = new string[thamso];
                object[] giatri = new object[thamso];
                bien[0] = "@Ngay";
                if (dtpNgay.SelectedDate != null)
                {
                    giatri[0] = dtpNgay.SelectedDate.Value.ToString("yyyy-MM-dd");
                }
                bien[1]   = "@MaPos";
                giatri[1] = bll.Left(CboPos.SelectedValue.ToString().Trim(), 6);
                bien[2]   = "@MaXa";
                giatri[2] = bll.Left(CboXa.SelectedValue.ToString().Trim(), 6);
                bien[3]   = "@Nam";
                giatri[3] = comboBoxYear.SelectedValue.ToString().Trim();
                dt        = cls.LoadLdbf("usp_TTDSHN01", bien, giatri, thamso);
                rpt_ChkDoituong01 rpt = new rpt_ChkDoituong01();
                RPUtility.ShowRp(rpt, dt, this, srv.DbSourceSerVer(), srv.DbNameSerVer(), srv.DbUserSerVer(), srv.DbPassSerVer());

                //MessageBox.Show("Insert OK", "Thông báo", MessageBoxButton.OK, MessageBoxImage.Information);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error + " + ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }