// private void LoadQC() { //this.Cursor = Cursors.WaitCursor; try { if (dgvQC.InvokeRequired) { InvokeCallBack d = new InvokeCallBack(LoadQC); this.Invoke(d); } else { DataTable dt = bll.SelectQcMonitor(fmMain.CompanyCode); //dt.Columns.Add("LASTTIMEMIN", typeof(string)); //foreach (DataRow dr in dt.Rows) //{ // dr["LASTTIMEMIN"] = string.Format("{0}{1}", dr["lasttime"].ToString(), "分钟"); //} dgvQC.DataSource = dt; } } catch (Exception ex) { //MessageBox.Show(ex.Message); } finally { //this.Cursor = Cursors.Default; } }
public void LoadPhotoAsy(object state) { LoadPhotoState state1 = (LoadPhotoState)state; if (state1.Pb.InvokeRequired) { InvokeCallBack d = new InvokeCallBack(LoadPhotoAsy); this.Invoke(d, new object[] { state1 }); } else { state1.Pb.ImageLocation = state1.Url; } }
private void LoadqcRpt() { try { if (reportViewer2.InvokeRequired) { InvokeCallBack d = new InvokeCallBack(LoadqcRpt); this.Invoke(d); } else { DataTable dt1 = bll.SelectVslMonitor2(); DataTable dt2 = bll.SelectQcMonitor2(); ReportDataSource rds = new ReportDataSource(); rds.Name = "Monitor_T_VESSEL"; rds.Value = dt1; ReportDataSource rds2 = new ReportDataSource(); rds2.Name = "Monitor_T_QC"; rds2.Value = dt2; reportViewer2.LocalReport.DataSources.Clear(); reportViewer2.LocalReport.DataSources.Add(rds); reportViewer2.LocalReport.DataSources.Add(rds2); this.reportViewer2.RefreshReport(); } } catch (Exception ex) { //MessageBox.Show(ex.Message); } finally { //this.Cursor = Cursors.Default; } }
public void LoadPhotoAsy(object state) { try { LoadPhotoState state1 = (LoadPhotoState)state; if (state1.Pb.InvokeRequired) { InvokeCallBack d = new InvokeCallBack(LoadPhotoAsy); this.Invoke(d, new object[] { state1 }); } else { if (state1.Pb.Image != null) { state1.Pb.Image.Dispose(); state1.Pb.Image = null; } state1.Pb.ImageLocation = state1.Url; } } catch { } }
private void LoadCnt() { //this.Cursor = Cursors.WaitCursor; try { if (this.dataGridView1.InvokeRequired) { InvokeCallBack d = new InvokeCallBack(LoadCnt); this.Invoke(d); } else { dtCnt.Dispose(); dtCnt = bll.SelectCntMonitor(fmMain.CompanyCode); this.dataGridView1.DataSource = dtCnt; for (int i = 0; i < dataGridView1.RowCount; i++) { string status = string.Format("{0}-{1}", dataGridView1[3, i].Value.ToString(), dataGridView1[4, i].Value.ToString()); switch (status) { case "成功处理-装": dataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.Green; break; case "成功处理-卸": dataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.RoyalBlue; break; case "待处理-装": dataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.MediumOrchid; break; case "待处理-卸": dataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.LightGreen; break; case "正在处理-装": dataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.Yellow; break; case "正在处理-卸": dataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.Yellow; break; case "转异常-装": case "转异常-卸": dataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.Red; break; } } } } catch (Exception ex) { //MessageBox.Show(ex.Message); } finally { //this.Cursor = Cursors.Default; } }