void Bind() { var rm = sc.GetRegionInfo(datePick.Value); if (rm.IsSuccess) { orderdata.DataSource = rm.Content; } else { MessageBox.Show(rm.MessageText); //orderdata.DataSource = null; orderdata.AutoGenerateColumns = false; orderdata.DataSource = new List <MainOrder>(); } this.txt_codestr.Text = ""; }