コード例 #1
0
        private void العبوات_منتهية_الصلاحية_Load(object sender, EventArgs e)
        {
            Connection    conn = new Connection(); string constr = conn.getconstr();
            SqlConnection connection = new SqlConnection(constr);

            connection.Open();
            try
            {
                //cmd = new SqlCommand("select * from bloodpackage where exDate <'" + dtNow.Value + "'", con);
                cmd             = new SqlCommand("bloodBank_bloodPackage_select", connection);
                cmd.CommandType = System.Data.CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("exDate", dtNow.Value);
                dr = cmd.ExecuteReader();
                DataTable dt = new DataTable();
                dt.Load(dr);
                dataGridView1.DataSource = dt;
                dr.Close();

                expiredPackagePrint nw = new expiredPackagePrint(dt);
                nw.Show();
                //this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            connection.Close();
        }
コード例 #2
0
        private void linkLabel22_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            //العبوات_منتهية_الصلاحية nw = new العبوات_منتهية_الصلاحية();
            //nw.Show();
            expiredPackagePrint nw = new expiredPackagePrint();

            nw.Show();
        }