Exemplo n.º 1
0
        private void btnguardar_Click(object sender, EventArgs e)
        {
            carnets objcarts = new carnets();

            objcarts.SetParameterValue("@numer", idcarnet);
            string user = Environment.UserName.ToString();
            string dir  = @"C:\Users\" + user + @"\Documents\Parking_Storage\Carnets\";

            objcarts.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, dir + codpark + ".pdf");
            this.DialogResult = DialogResult.OK;
            this.Hide();
        }
Exemplo n.º 2
0
 private void repoCarnet_Load(object sender, EventArgs e)
 {
     try
     {
         carnets objcarts = new carnets();
         objcarts.SetParameterValue("@numer", idcarnet);
         crystalReportViewer1.ReportSource = objcarts;
     }
     catch (Exception)
     {
         error.label2.Text = "Ocurrió un error en la ejecución,\nvuelva a inténtarlo más tarde";
         result            = error.ShowDialog();
         if (result == DialogResult.OK)
         {
         }
     }
 }