If your "orders_m" model is extending from MY_Model (which it probably is), you can use all the standard Codeigniter Active Record functions.
if( $this->input->post('f_OrderNumber') )
{
$this->orders_m->like('OrderNumber', $this->input->post('f_OrderNumber'));
}
$orders = $this->orders_m->get_all(); // if you want everything OR
$orders = $this->orders_m->get_many_by('field', 'value'); // if you have other parameters