private void GetCon() { Condition_Service service = new Condition_Service(); Condition_Vo vo = new Condition_Vo(); vo.Item_Name = txt_Item.Text; vo.Wc_Name = txt_WorkPlace.Text; dataGridView1.DataSource = service.GetCondition(vo); }
public List <Condition_Vo> GetCondition(Condition_Vo item) { using (SqlCommand cmd = new SqlCommand()) { cmd.Connection = new SqlConnection(this.ConnectionString); cmd.CommandText = "GetCondition"; cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@Wc_Name", item.Wc_Name); cmd.Parameters.AddWithValue("@Item_Name", item.Item_Name); cmd.Connection.Open(); SqlDataReader reader = cmd.ExecuteReader(); List <Condition_Vo> list = Helper.DataReaderMapToList <Condition_Vo>(reader); cmd.Connection.Close(); return(list); } }
public List <Condition_Vo> GetCondition(Condition_Vo item) { Condition_Dac dac = new Condition_Dac(); return(dac.GetCondition(item)); }