예제 #1
0
        private void btnSua_Click(object sender, RoutedEventArgs e)
        {
            string strup = "";

            try
            {
                cls.ClsConnect();
                string phong = CboPhong.SelectedValue.ToString().Trim();
                var    dtin  = cls.LoadDataText("select * from luu_tscc where TRANGTHAI='A' and POS_CD='" + CboPos.SelectedValue + "' and right(MAPHONG,2)='" + s.Right(CboPhong.SelectedValue.ToString().Trim(), 2) + "' order by LOAI_TS_CHITIET,MA_NHANHIEU_TS,MA_TS");
                if (dtin.Rows.Count > 0)
                {
                    rpt_TSCC_KiemKe rpt = new rpt_TSCC_KiemKe();
                    RPUtility.ShowRp(rpt, dtin, this, srv.DbSourceSerVer(), srv.DbNameSerVer(), srv.DbUserSerVer(),
                                     srv.DbPassSerVer());
                }
                else
                {
                    MessageBox.Show("Không có dữ liệu !", "Thông báo", MessageBoxButton.OK,
                                    MessageBoxImage.Information);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Lỗi", MessageBoxButton.OK, MessageBoxImage.Error);
            }
            cls.DongKetNoi();
        }
예제 #2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rpt_TSCC_KiemKe rpt = new rpt_TSCC_KiemKe();

            rpt.Site = this.Site;
            return(rpt);
        }