Ejemplo n.º 1
0
 private void btnOk_Click(object sender, RoutedEventArgs e)
 {
     if (Ration3.IsChecked == true)
     {
         WpfDinhSv_ThuCong f = new WpfDinhSv_ThuCong();
         f.ShowDialog();
     }
     else
     {
         dtNew = dt.Clone();
         foreach (DataRow dr in dt.Rows)
         {
             if ((bool)dr[0] == true)
             {
                 dtNew.ImportRow(dr);
             }
         }
         if (dtNew == null || dtNew.Rows.Count == 0)
         {
             MessageBox.Show("Chưa chọn khách hàng nào ", "Mess");
         }
         else
         {
             if (Ration1.IsChecked == true)
             {
                 rpt_DinhSv rpt = new rpt_DinhSv();
                 RPUtility.ShowRp(rpt, dtNew, this, srv.DbSourceSerVer(), srv.DbNameSerVer(), srv.DbUserSerVer(),
                                  srv.DbPassSerVer());
                 // dgvData.ItemsSource = dt.DefaultView;
             }
             else if (Ration2.IsChecked == true)
             {
                 rpt_DinhSv1 rpt = new rpt_DinhSv1();
                 RPUtility.ShowRp(rpt, dtNew, this, srv.DbSourceSerVer(), srv.DbNameSerVer(), srv.DbUserSerVer(),
                                  srv.DbPassSerVer());
             }
             else if (Ration4.IsChecked == true)
             {
                 rpt_SoLuuToRoi rpt = new rpt_SoLuuToRoi();
                 RPUtility.ShowRp(rpt, dtNew, this, srv.DbSourceSerVer(), srv.DbNameSerVer(), srv.DbUserSerVer(),
                                  srv.DbPassSerVer());
             }
         }
     }
 }
Ejemplo n.º 2
0
        private void Ration3_Checked(object sender, RoutedEventArgs e)
        {
            WpfDinhSv_ThuCong f = new WpfDinhSv_ThuCong();

            f.ShowDialog();
        }