/// <summary> /// 构造方法 /// </summary> public BoreholeInfoEntering() { InitializeComponent(); // 设置窗体默认属性 FormDefaultPropertiesSetter.SetEnteringFormDefaultProperties(this, Const_GM.INSERT_BOREHOLE_INFO); DataBindUtil.LoadLithology(LITHOLOGY); }
/// <summary> /// 带参数的构造方法 /// </summary> /// <param name="borehole"></param> public BoreholeInfoEntering(Borehole borehole) { InitializeComponent(); // 设置窗体默认属性 FormDefaultPropertiesSetter.SetEnteringFormDefaultProperties(this, Const_GM.UPDATE_BOREHOLE_INFO); using (new SessionScope()) { borehole = Borehole.Find(borehole.BoreholeId); // 孔号 txtBoreholeNumber.Text = borehole.BoreholeNumber; // 地面标高 txtGroundElevation.Text = borehole.GroundElevation.ToString(CultureInfo.InvariantCulture); // X坐标 txtCoordinateX.Text = borehole.CoordinateX.ToString(CultureInfo.InvariantCulture); // Y坐标 txtCoordinateY.Text = borehole.CoordinateY.ToString(CultureInfo.InvariantCulture); // Z坐标 txtCoordinateZ.Text = borehole.CoordinateZ.ToString(CultureInfo.InvariantCulture); // 获取岩性信息 DataBindUtil.LoadLithology(LITHOLOGY); // 明细 gvCoalSeamsTexture.RowCount = borehole.BoreholeLithologys.Count + 1; for (var i = 0; i < borehole.BoreholeLithologys.Count; i++) { // 岩性名称 var iLithologyId = borehole.BoreholeLithologys[i].Lithology.LithologyId; var lithology = Lithology.Find(iLithologyId); gvCoalSeamsTexture[0, i].Value = lithology.LithologyName; // 底板标高 gvCoalSeamsTexture[1, i].Value = borehole.BoreholeLithologys[i].FloorElevation; // 厚度 gvCoalSeamsTexture[2, i].Value = borehole.BoreholeLithologys[i].Thickness; // 煤层名称 gvCoalSeamsTexture[3, i].Value = borehole.BoreholeLithologys[i].CoalSeamsName; // 坐标X gvCoalSeamsTexture[4, i].Value = borehole.BoreholeLithologys[i].CoordinateX.ToString(CultureInfo.InvariantCulture); // 坐标Y gvCoalSeamsTexture[5, i].Value = borehole.BoreholeLithologys[i].CoordinateY.ToString(CultureInfo.InvariantCulture); // 坐标Z gvCoalSeamsTexture[6, i].Value = borehole.BoreholeLithologys[i].CoordinateX.ToString(CultureInfo.InvariantCulture); } } }
public BoreholeInfoEntering(IPoint pt) { InitializeComponent(); // 设置窗体默认属性 FormDefaultPropertiesSetter.SetEnteringFormDefaultProperties(this, Const_GM.INSERT_BOREHOLE_INFO); txtCoordinateX.Text = pt.X.ToString(CultureInfo.InvariantCulture); txtCoordinateY.Text = pt.Y.ToString(CultureInfo.InvariantCulture); txtCoordinateZ.Text = pt.Z.ToString(CultureInfo.InvariantCulture).Equals("非数字") ? "0" : pt.Z.ToString(CultureInfo.InvariantCulture); DataBindUtil.LoadLithology(LITHOLOGY); }
private void TunnelInfoEntering_Load(object sender, EventArgs e) { _formHeight = Height; ChangeFormSize(null); DataBindUtil.LoadLithology(cboLithology, "煤层"); var hash = new Hashtable { { "主运顺槽", 0 }, { "辅运顺槽", 1 }, { "切眼", 2 }, { "回采面其他关联巷道", 3 }, { "掘进巷道", 4 }, { "横川", 6 }, { "其他地点", 7 }, { "其他", 5 } }; var list = new ArrayList(); foreach (DictionaryEntry entry in hash) { list.Add(entry); } cboTunnelType.DataSource = list; cboTunnelType.DisplayMember = "Key"; cboTunnelType.ValueMember = "Value"; if (Text == Const_GM.TUNNEL_INFO_ADD) { selectWorkingFaceControl1.LoadData(); cboTunnelType.SelectedValue = (int)TunnelTypeEnum.OTHER; } else { selectWorkingFaceControl1.LoadData(Tunnel.WorkingFace); txtTunnelName.Text = Tunnel.TunnelName; cboSupportPattern.Text = Tunnel.TunnelSupportPattern; cboLithology.SelectedItem = Tunnel.Lithology; txtDesignLength.Text = Tunnel.TunnelDesignLength.ToString(CultureInfo.InvariantCulture); cboCoalOrStone.Text = Tunnel.CoalOrStone; cboTunnelType.SelectedValue = (int)Tunnel.TunnelType; } }