private DataSet1.T_OCRX_CNTRow NewRow(DataSet1.T_OCRX_CNTRow oldNew) { DataSet1.T_OCRX_CNTDataTable dt = new DataSet1.T_OCRX_CNTDataTable(); DataSet1.T_OCRX_CNTRow rowN = dt.NewT_OCRX_CNTRow(); rowN.ItemArray = oldNew.ItemArray; rowN.CONTAINER_NO = string.Empty; rowN.RCONTAINER_NO = string.Empty; rowN.DOCK_ID = -1; rowN.CSTATUS = 1; rowN.CTOSERRORCODE = "0"; rowN.CONTAINERID = 0; rowN.ISARCHIVED = "N"; rowN.ISOVERTOP = "N"; rowN.OVA = decimal.Zero; rowN.OVF = decimal.Zero; rowN.OVH = decimal.Zero; rowN.OVL = decimal.Zero; rowN.OVR = decimal.Zero; rowN.ISOVERDIS = "N"; rowN.ISDAMAGE = "N"; rowN.Dmg = string.Empty; rowN.ISIMDG = "N"; rowN.Imdg1 = string.Empty; rowN.Imdg2 = string.Empty; rowN.Imdg3 = string.Empty; rowN.DOCK_ID2 = oldNew.DOCK_ID; return(rowN); }
/// <summary> /// 复制识别信息 /// </summary> /// <param name="row"></param> /// <returns></returns> private DataSet1.T_OCRX_CNTRow CopyRow(OCR.Model.OcrCnt.T_OCR_CNTRow row) { DataSet1.T_OCRX_CNTRow r = new DataSet1.T_OCRX_CNTDataTable().NewT_OCRX_CNTRow(); r.DOCK_ID = row.DOCK_ID; r.CONTAINER_NO = row.CONTAINER_NO; r.CONTAINER_SHAPE = row.CONTAINER_SHAPE; r.CONTAINER_SIZE = row.CONTAINER_SIZE; r.CTYPE = row.CTYPE; r.DOCK_STATUS = row.DOCK_STATUS; r.CSTATUS = Convert.ToDecimal(Config.CStatus.WaitHandle); r.TRVALCRANE_ID = row.TRVALCRANE_ID; r.TRVAL_NO = row.TRVAL_NO; r.CNAM = row.CNAM; r.ENAM = row.ENAM; r.SHIP_CODE = row.SHIP_CODE; r.C_VOYAGE = row.C_VOYAGE; r.PIC_NUM = row.PIC_NUM; r.MSG_INDEX = row.MSG_INDEX; r.CTIME = row.COPYTIME; r.PMS_ID = row.PMS_ID; r.BERTH_NUM = row.BERTH_NUM; r.ISARCHIVED = "N"; r.CONTAINERID = row.IsCONTAINERIDNull() ? 0 : row.CONTAINERID; r.LINECODE = row.IsLINECODENull() ? string.Empty : row.LINECODE; r.SERVICECODE = row.IsSERVICECODENull() ? string.Empty : row.SERVICECODE; r.SHIPAGENT = row.IsSHIPAGENTNull() ? string.Empty : row.SHIPAGENT; r.SHIPOWNER = row.IsSHIPOWNERNull() ? string.Empty : row.SHIPOWNER; r.COMPANYCODE = row.IsCOMPANYCODENull() ? string.Empty : row.COMPANYCODE; return(r); }
private void dgvDmgInfo_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (dgvDmgInfo.Columns[e.ColumnIndex].Name == "Rollback") { try { decimal dockid = decimal.Parse(dgvDmgInfo.Rows[e.RowIndex].Cells[1].Value.ToString()); DataSet1.T_OCRX_CNTDataTable dt = bll.SelectCnt(dockid); row = dt[0]; row2 = dt.Count > 1 ? dt[1] : null; bll.row1 = row; bll.row2 = row2; this.Cursor = Cursors.WaitCursor; if (row == null) { MessageBox.Show("该记录不存在"); return; } fmExcepInput fm = new fmExcepInput(); fm.reason = row.CTOSERRORMSG; DialogResult drs = fm.ShowDialog(); //DialogResult drs = MessageBox.Show("确认转异常处理?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2); if (drs == DialogResult.No || drs == DialogResult.Cancel) { return; } row.CTOSERRORMSG = fm.reason; if (row2 != null) { row2.CTOSERRORMSG = fm.reason; } bll.Rollback(); DataSet1.T_OCRX_DAMAGERow damageRow = damage[e.RowIndex]; bll.RollbackDamage(damageRow); MessageBox.Show("回退成功."); this.button1.PerformClick(); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { this.Cursor = Cursors.Default; } } }
/// <summary> /// 查所有未处理的异常 /// </summary> /// <returns></returns> public DataSet1.T_OCRX_CNTDataTable SelectExcep(string companyCode) { DataSet1.T_OCRX_CNTDataTable dt = OCRX.DAL.cctdbDAL.SelectExcep(companyCode); foreach (DataSet1.T_OCRX_CNTRow row22 in dt) { row22.LOADDIS = row22.DOCK_STATUS == 0 ? "装" : "卸"; row22.TWOCNTS = row22.CTYPE == 1 ? "是" : "否"; } return(dt); }
private DataSet1.T_OCRX_CNTRow NewRow(DataSet1.T_OCRX_CNTRow oldNew) { DataSet1.T_OCRX_CNTDataTable dt = new DataSet1.T_OCRX_CNTDataTable(); DataSet1.T_OCRX_CNTRow rowN = dt.NewT_OCRX_CNTRow(); rowN.ItemArray = oldNew.ItemArray; rowN.CONTAINER_NO = string.Empty; rowN.RCONTAINER_NO = string.Empty; rowN.DOCK_ID = -1; rowN.CSTATUS = 1; rowN.CTOSERRORCODE = "0"; rowN.CONTAINERID = 0; return(rowN); }
//取所有未处理异常数据 private void GetAllData() { this.Cursor = Cursors.WaitCursor; try { loadingData = true; cnts = bll.SelectExcep(fmMain.CompanyCode); dgvData.DataSource = cnts; } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { this.Cursor = Cursors.Default; loadingData = false; } }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (dataGridView1.Columns[e.ColumnIndex].Name == "coldmgbtn") { try { if (dataGridView1.Rows[e.RowIndex].Cells["IsDmg"].Value != null && dataGridView1.Rows[e.RowIndex].Cells["IsDmg"].Value.ToString() == "Y") { decimal dockid = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["DOCK_ID"].Value.ToString()); DataSet1.T_OCRX_CNTDataTable dmginfto = bll.SelectDamageInfo(Convert.ToDecimal(dataGridView1.Rows[e.RowIndex].Cells["DOCK_ID"].Value)); //if (fmDamage == null || fmDamage.IsDisposed) //{ // fmDamage = new fmDamageInfo(); //} //fmDamage.Text = string.Format("{0} 残损信息", dataGridView1.Rows[e.RowIndex].Cells["container_no"].Value.ToString()); //fmDamage.records = dmginfto; //fmDamage.UpdateDGV(dmginfto); //fmDamage.Show(); //fmDamage.BringToFront(); if (fmDmgModify != null && !fmDmgModify.IsDisposed) { fmDmgModify.Close(); } string containerno = string.IsNullOrEmpty(dataGridView1.Rows[e.RowIndex].Cells["RCONTAINER_NO"].Value.ToString())? dataGridView1.Rows[e.RowIndex].Cells["container_no"].Value.ToString():dataGridView1.Rows[e.RowIndex].Cells["RCONTAINER_NO"].Value.ToString(); fmDmgModify = new fmDmgModify(dockid, containerno); //} fmDmgModify.Show(); fmDmgModify.BringToFront(); } else { MessageBox.Show("非残损箱,无法查看"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } } }
private void NextRecord() { this.Cursor = Cursors.WaitCursor; try { if ((row != null && row.CSTATUS == Convert.ToInt32(Config.CStatus.Fetched)) || (numMoves.Value > 1 && row2 != null && row2.CSTATUS == Convert.ToInt32(Config.CStatus.Fetched))) { //加载图片 LoadPhotos(); MessageBox.Show("当前记录未处理!"); return; } InitCntCtrl(); DataSet1.T_OCRX_CNTDataTable dt = bll.SelectNextRecord(UserId, CompanyCode); if (dt == null || dt.Rows.Count == 0) { ClearImg(); MessageBox.Show("没有未处理的记录,请稍后再尝试"); return; } bll = new MainBLL(InitCntCtrl()); row = dt[0]; row2 = dt.Count > 1 ? dt[1] : null; bll.row1 = row; bll.row2 = row2; //顶部信息 lblLoadDis.Text = row.DOCK_STATUS == 0 ? "装船" : "卸船"; lblLoadPos.Text = ""; //?暂时不填 lblQC.Text = row.TRVAL_NO; lblVessel.Text = row.SHIP_CODE; lblVoyage.Text = row.C_VOYAGE; lblService.Text = row.SERVICECODE; lblShipAgent.Text = row.SHIPAGENT; lblBerth.Text = row.BERTH_NUM; btnUp.Enabled = true; btnDown.Enabled = true; //加载图片 LoadPhotos(); //填充箱信息 cntResult = bll.InitCntCtrl(row); numMoves.Focus(); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { this.Cursor = Cursors.Default; } }
public void UpdateExcepStatus([FromBody] DataSet1.T_OCRX_CNTDataTable row) { webDAL.UpdateExcepStatus(row[0]); }
private void btnNext_Click_1(object sender, EventArgs e) { this.Cursor = Cursors.WaitCursor; try { cnts = bll.SelectExcep(fmMain.CompanyCode); dgvData.DataSource = cnts; if (dgvData.DataSource == null) { return; } if (cnts.Count == 0) { return; } InitCntCtrl(); bll = new MainBLL(InitCntCtrl()); row = (DataSet1.T_OCRX_CNTRow)((DataRowView)dgvData.CurrentRow.DataBoundItem).Row; //双吊找第二个柜 if (row.CTYPE == 1) { foreach (DataSet1.T_OCRX_CNTRow rr in cnts) { if (rr.MSG_INDEX == row.MSG_INDEX && rr.TRVAL_NO == row.TRVAL_NO) { row2 = rr; } } } //row2 = dt.Count > 1 ? dt[1] : null; bll.row1 = row; bll.row2 = row2; btnUp.Enabled = true; btnDown.Enabled = true; //加载图片 LoadPhotos(); //填充箱信息 cntResult = bll.InitCntCtrl(row); numMoves.Focus(); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { this.Cursor = Cursors.Default; } }
public void InsertCntx([FromBody] DataSet1.T_OCRX_CNTDataTable row) { webDAL.InsertCntx(row[0]); }
public void RollbackCntStatus(DataSet1.T_OCRX_CNTDataTable row) { webDAL.UpdateCntStatus(row[0]); }