Esempio n. 1
0
        public void Historico(FRMGridHist h, int idpack, string opcion, string desde, string hasta)
        {
            string sp = "SP_Historico_Packing";

            try
            {
                con = new SqlConnection(cadena());
                SqlCommand com = new SqlCommand(sp, con);
                com.CommandType = CommandType.StoredProcedure;
                con.Open();
                com.Parameters.Add("@opcion", SqlDbType.VarChar).Value = opcion;
                com.Parameters.Add("@DESDE", SqlDbType.VarChar).Value  = desde;
                com.Parameters.Add("@HASTA", SqlDbType.VarChar).Value  = hasta;
                com.Parameters.Add("@ID", SqlDbType.VarChar).Value     = idpack;
                SqlDataReader dr = com.ExecuteReader();
                while (dr.Read())
                {
                    h.dgvArticulos.Rows.Add(dr["Id_Packing"], dr["Fecha_Creacion"], dr["Fecha_Conclucion"]);
                }
                con.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show("error al Historico" + ex.Message);
            }
        }
Esempio n. 2
0
        private void btnXCancel_Click(object sender, EventArgs e)
        {
            FRMGridHist hist = new FRMGridHist();

            hist.TopLevel      = false;
            hist.StartPosition = FormStartPosition.CenterScreen;
            hist.Parent        = PnlPrincipal;
            hist.Show();
            hist.BringToFront();
        }