private void SetGrid()
        {
            Search_Vo vo = new Search_Vo();

            vo.StartDate = dtp_SDate.Value.ToString("yyyy-MM-dd");
            vo.EndDate   = dtp_EDate.Value.ToString("yyyy-MM-dd");
            Search_Service service = new Search_Service();

            dataGridView1.DataSource = service.SearchBarcodeDate(vo);
        }
Exemple #2
0
        public List <Search_Vo> SearchBarcodeDate(Search_Vo item)
        {
            using (SqlCommand cmd = new SqlCommand())
            {
                cmd.Connection  = new SqlConnection(ConnectionString);
                cmd.CommandText = "SearchBarcodeDate";
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@StartDate", item.StartDate);
                cmd.Parameters.AddWithValue("@EndDate", item.EndDate);

                cmd.Connection.Open();
                SqlDataReader    reader = cmd.ExecuteReader();
                List <Search_Vo> list   = Helper.DataReaderMapToList <Search_Vo>(reader);
                cmd.Connection.Close();

                return(list);
            }
        }
Exemple #3
0
        public List <Search_Vo> SearchBarcodeDate(Search_Vo item)
        {
            Search_Dac dac = new Search_Dac();

            return(dac.SearchBarcodeDate(item));
        }