private void btn_AllowGrdQuery_Click(object sender, EventArgs e) { if (dt_rq.DateTime == DateTime.MinValue) { MessageBox.Show("请选择日期"); return; } DataTable dt = bll_order.GetOrderMonitor_Roll(dt_rq.DateTime, dt_rq2.DateTime, img_prodLine.EditValue.ToString()); SetTableNullToZero(dt); this.gc_KDZGZ.DataSource = dt; this.gv_KDZGZ.OptionsView.ColumnAutoWidth = false; //SetGridViewRowNum.SetRowNum(gv_KDZGZ); gv_KDZGZ.BestFitColumns(); SetGridViewStyle(); }