public void NodeViewLoad() { try { lbWaybillNumber.Text = waybase.Numberk__BackingField; lbWarehouseName.Text = "【" + node.StorageNamek__BackingField + "】"; lbStartTime.Text = node.operateAtk__BackingField.ToString("yyyy-MM-dd HH:mm:ss"); //获取开始时间的下面的时间 ResultModelOfArrayOfModel_Waybill_Noded4FqxSXX nodedate = cs.GetWaybillNodeList(node.BaseIdk__BackingField.ToString(), node.operateAtk__BackingField.ToString(), null); if (nodedate.Code != 0) { MessageBox.Show(nodedate.Message); } else { foreach (Model_Waybill_Node item in nodedate.Data) { lbEndTime.Text = item.operateAtk__BackingField.ToString("yyyy-MM-dd HH:mm:ss"); } } } catch (Exception ex) { MessageBox.Show(ex.Message, "error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
/// <summary> /// 冷链数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tsmColdChainData_Click(object sender, EventArgs e) { try { Model_Waybill_Node node = dgvWaybill_Node.SelectedRows[0].Tag as Model_Waybill_Node; //获取开始时间的下面的时间 ResultModelOfArrayOfModel_Waybill_Noded4FqxSXX nodedate = cs.GetWaybillNodeList(node.BaseIdk__BackingField.ToString(), node.operateAtk__BackingField.ToString(), null); if (nodedate.Code != 0) { MessageBox.Show(nodedate.Message); } else { if (nodedate.Data.Length <= 0) { MessageBox.Show("没有下一条物流节点...."); return; } } Model_Waybill_Base waybase = waybill_base; FrmLogisticsNodeSuperView nodesuper = new FrmLogisticsNodeSuperView(); nodesuper.waybase = waybase; nodesuper.node = node; nodesuper.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message, "error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void contextMenuStrip1_Opening(object sender, CancelEventArgs e) { ResultModelOfArrayOfModel_Waybill_Noded4FqxSXX count = cs.GetWaybillNodeList(waybill_base.Idk__BackingField.ToString(), null, null); if (count.Data.Count <Model_Waybill_Node>() <= 0) { contextMenuStrip1.Enabled = false; return; } Model_Waybill_Node node = dgvWaybill_Node.SelectedRows[0].Tag as Model_Waybill_Node; if (node.Arrivedk__BackingField == Enum_Arrived.InTransit) { tsmColdChainData.Enabled = true; tsmSignPicture.Enabled = false; } else { tsmColdChainData.Enabled = false; tsmSignPicture.Enabled = true; } }
//显示物流节点信息 public void WaybillNodeLoad() { try { if (waybill_base.Idk__BackingField.ToString() == null) { return; } string pageIndexAndCount = winFormPager1.PageIndex + "." + winFormPager1.PageSize; ResultModelOfArrayOfModel_Waybill_Noded4FqxSXX waybill_node = cs.GetWaybillNodeList(waybill_base.Idk__BackingField.ToString(), null, pageIndexAndCount); ResultModelOfArrayOfModel_Waybill_Noded4FqxSXX count = cs.GetWaybillNodeList(waybill_base.Idk__BackingField.ToString(), null, null); winFormPager1.DrawControl(count.Data.Count <Model_Waybill_Node>()); if (waybill_node.Code != 0) { MessageBox.Show(waybill_node.Message); } else { dgvWaybill_Node.AutoGenerateColumns = false; dgvWaybill_Node.Rows.Clear(); Model_Waybill_Node node = new Model_Waybill_Node(); foreach (Model_Waybill_Node item in waybill_node.Data) { int rowIndex = dgvWaybill_Node.Rows.Add(); dgvWaybill_Node.Rows[rowIndex].Cells[0].Value = item.operateAtk__BackingField.ToString("yyyy-MM-dd HH:mm:ss");; //node.Contentk__BackingField = "【" + item.StorageNamek__BackingField + "】" + item.Contentk__BackingField; node.Contentk__BackingField = item.Contentk__BackingField; dgvWaybill_Node.Rows[rowIndex].Cells[1].Value = node.Contentk__BackingField; dgvWaybill_Node.Rows[rowIndex].Tag = item; } } } catch (Exception ex) { MessageBox.Show(ex.Message, "error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }