//private void _btn_details_Click(object sender, RoutedEventArgs e)
        //{
        //    string batch_no = (sender as Button).Tag.ToString();

        //    grid_info.Children.Add(new UcCreateCertificatedetails(dbOperation, batch_no));
        //}

        private void _btn_card_Click(object sender, RoutedEventArgs e)
        {
            string             card_id = (sender as Button).Tag.ToString();
            CertificatePreview cer     = new CertificatePreview(dbOperation, card_id);

            cer.ShowDialog();
        }
        void _tableview_DetailsRowEnvent(string id)
        {
            DataRow[] rows = currenttable.Select("cardid = '" + id + "'");
            string    type = rows[0]["type"].ToString();

            if (type == "动物证")
            {
                CertificatePreview cer = new CertificatePreview(dbOperation, id);
                cer.ShowDialog();
            }
            else if (type == "产品证")
            {
                CertificateProductPreview cer = new CertificateProductPreview(dbOperation, id);
                cer.ShowDialog();
            }
        }
        void _tableview_DetailsRowEnvent(string id)
        {
            DataRow[] rows = currenttable.Select("cardid = '" + id + "'");
            string type = rows[0]["type"].ToString();

            if (type == "动物证")
            {
                CertificatePreview cer = new CertificatePreview(dbOperation, id);
                cer.ShowDialog();
            }
            else if (type == "产品证")
            {
                CertificateProductPreview cer = new CertificateProductPreview(dbOperation, id);
                cer.ShowDialog();
            }

        }
        //private void _btn_details_Click(object sender, RoutedEventArgs e)
        //{
        //    string batch_no = (sender as Button).Tag.ToString();

        //    grid_info.Children.Add(new UcCreateCertificatedetails(dbOperation, batch_no));
        //}

        private void _btn_card_Click(object sender, RoutedEventArgs e)
        {
            string card_id = (sender as Button).Tag.ToString();
            CertificatePreview cer = new CertificatePreview(dbOperation, card_id);
            cer.ShowDialog();
        }