Beispiel #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rpt_RsGqvl rpt = new rpt_RsGqvl();

            rpt.Site = this.Site;
            return(rpt);
        }
Beispiel #2
0
        private void btnOk_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                /*
                 * str.TaoThuMuc(Thumuc);
                 * dtNew = dt.Clone();
                 * foreach (DataRow dr in dt.Rows)
                 * {
                 *  if ((bool)dr[0] == true)
                 *  {
                 *      dtNew.ImportRow(dr);
                 *  }
                 * }
                 */
                dtNew = dt.GetChanges();
                if (dtNew == null || dtNew.Rows.Count == 0)
                {
                    MessageBox.Show("Chưa có thay đổi ngày nào !", "Thông báo", MessageBoxButton.OK, MessageBoxImage.Warning);
                }
                else
                {
                    rpt_RsGqvl rpt = new rpt_RsGqvl();
                    RPUtility.ShowRp(rpt, dtNew, this, srv.DbSourceSerVer(), srv.DbNameSerVer(), srv.DbUserSerVer(), srv.DbPassSerVer());

                    cls.ClsConnect();
                    foreach (DataRow dr in dtNew.Rows)
                    {
                        string upd = "update LUU_GQVL set TT_CHECK='Y' where KU_SOKU='" + dr["KU_SOKU"] + "' and TT_CHECK='N'";
                        cls.UpdateDataText(upd);
                    }
                    MessageBox.Show("Lưu thành công ! " + FileName, "Thông báo", MessageBoxButton.OK, MessageBoxImage.Information);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
            cls.DongKetNoi();
        }