コード例 #1
0
ファイル: WpfVpp.xaml.cs プロジェクト: tutmvbsp/vbspinfor
 private void btnIn_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         cls.ClsConnect();
         string str = "select * from LUUVPP where MAPOS='" + bll.Left(CboPos.SelectedValue.ToString().Trim(), 6)
                      + "' and PHONGTO='" + bll.Left(CboPB.SelectedValue.ToString().Trim(), 2) + "' and THANG = '"
                      + bll.Left(comboBoxMonth.SelectedValue.ToString().Trim(), 2) + "' and NAM='" + comboBoxYear.SelectedValue.ToString().Trim() + "' and SOLUONG>0";
         //MessageBox.Show(str);
         var dtin = cls.LoadDataText(str);
         if (dtin.Rows.Count > 0)
         {
             rpt_Vpp01 rpt = new rpt_Vpp01();
             RPUtility.ShowRp(rpt, dtin, this, srv.DbSourceSerVer(), srv.DbNameSerVer(), srv.DbUserSerVer(),
                              srv.DbPassSerVer());
         }
         else
         {
             MessageBox.Show("Không có bản ghi nào !", "Thông báo", MessageBoxButton.OK, MessageBoxImage.Information);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
     cls.DongKetNoi();
 }
コード例 #2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rpt_Vpp01 rpt = new rpt_Vpp01();

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