private void pictureBox1_Click(object sender, EventArgs e)
 {
     if (Dbers.GetInstance().SelfDber.Entities <CmcsTrainWatch>(String.Format(" where TrainWeightRecordId='{0}'", Id)).Count > 0)
     {
         FrmWeightBridgeLoad_Pic pic = new FrmWeightBridgeLoad_Pic(Id);
         pic.ShowDialog();
     }
 }
Ejemplo n.º 2
0
        private void superGridControl1_CellMouseDown(object sender, GridCellMouseEventArgs e)
        {
            if (e.GridCell.ColumnIndex == -1 || e.GridCell.GridRow.Index == -1)
            {
                return;
            }

            SuperGridControl      sgc    = (SuperGridControl)sender;
            CmcsTrainWeightRecord entity = Dbers.GetInstance().SelfDber.Get <CmcsTrainWeightRecord>(sgc.PrimaryGrid.GetCell(e.GridCell.GridRow.Index, 13).Value.ToString());

            if (entity == null)
            {
                return;
            }
            String newid = sgc.PrimaryGrid.GetCell(e.GridCell.GridRow.Index, 13).Value.ToString();

            switch (sgc.PrimaryGrid.GetCell(e.GridCell.GridRow.Index, e.GridCell.ColumnIndex).NullString)
            {
            case "抓拍":
                if (Dbers.GetInstance().SelfDber.Entities <CmcsTrainWatch>(String.Format(" where TrainWeightRecordId='{0}'", newid)).Count > 0)
                {
                    FrmWeightBridgeLoad_Pic frm1 = new FrmWeightBridgeLoad_Pic(newid);
                    if (frm1.ShowDialog() == DialogResult.OK)
                    {
                    }
                }
                else
                {
                }
                break;

            case "装车线":
                if (Dbers.GetInstance().SelfDber.Entities <CmcsTrainLine>(String.Format(" where TrainWeightRecordId='{0}'", newid)).Count > 0)
                {
                    FrmWeightBridgeLoad_Line frm = new FrmWeightBridgeLoad_Line(newid);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                    }
                }
                else
                {
                }
                break;
            }
        }