|
|
|
|
|
using GeoSigma.SigmaDrawerElement;
|
|
|
|
|
|
using GeoSigmaDrawLib;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
|
using System.Data;
|
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
|
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TrackBar;
|
|
|
|
|
|
using GeoSigmaDrawLib;
|
|
|
|
|
|
|
|
|
|
|
|
namespace SigmaDrawerElement
|
|
|
|
|
|
{
|
|
|
|
|
|
public partial class FrmInTrackCommonData : Form
|
|
|
|
|
|
{
|
|
|
|
|
|
//public List<DataItemInTrack> m_ListValues;
|
|
|
|
|
|
public CDataItemInTrackList m_ListValues;
|
|
|
|
|
|
|
|
|
|
|
|
//public FrmInTrackCommonData(List<DataItemInTrack> dataList ,UInt64 parentobj)
|
|
|
|
|
|
public FrmInTrackCommonData(CDataItemInTrackList dataList, UInt64 parentobj)
|
|
|
|
|
|
{
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
|
|
|
|
|
|
m_ListValues = dataList;
|
|
|
|
|
|
|
|
|
|
|
|
string table ="";
|
|
|
|
|
|
string colStr = "";
|
|
|
|
|
|
bool v = GeoSigmaWellPoleXY.TrackGetDataSourceID(parentobj, ref table, ref colStr);
|
|
|
|
|
|
|
|
|
|
|
|
List<string> colsNames = new List<string>();
|
|
|
|
|
|
List<string> values = new List<string>();
|
|
|
|
|
|
for(int i = 0; i< dataList.Count;i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
colsNames.Add(tableInfoQuery.getColumnChsNameFromEngName(table,dataList[i].RefColId));
|
|
|
|
|
|
values.Add(dataList[i].Value);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < colsNames.Count; i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.dataGridView1.Columns.Add(new DataGridViewTextBoxColumn()
|
|
|
|
|
|
{
|
|
|
|
|
|
HeaderText = colsNames[i],
|
|
|
|
|
|
Name = dataList[i].Value,
|
|
|
|
|
|
Width = 120,
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dataGridView1.Rows.Add(values.ToArray());
|
|
|
|
|
|
|
|
|
|
|
|
// GeoSigmaWellPoleXY.GetWellBaseObjectParent(inTrack.rowData.wellPoleContext.selectObjHandle, ref ParentObj);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void btnOK_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
// m_ListValues = new List<DataItemInTrack>();
|
|
|
|
|
|
DataGridViewRow row = dataGridView1.Rows[0];
|
|
|
|
|
|
|
|
|
|
|
|
int id = 0;
|
|
|
|
|
|
foreach(DataGridViewCell cell in row.Cells)
|
|
|
|
|
|
{
|
|
|
|
|
|
string cellvalue = cell.Value?.ToString() ?? "";
|
|
|
|
|
|
m_ListValues[id].Value = cellvalue;
|
|
|
|
|
|
id++;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|