Example #1
0
        /// <summary>
        ///     提交
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            // 验证
            if (!Check())
            {
                DialogResult = DialogResult.None;
                return;
            }
            DialogResult = DialogResult.OK;

            // 创建一个瓦斯含量点实体
            if (GasContent == null)
            {
                var gasContent = new GasContent
                {
                    CoordinateX     = Convert.ToDouble(txtCoordinateX.Text),
                    CoordinateY     = Convert.ToDouble(txtCoordinateY.Text),
                    CoordinateZ     = Convert.ToDouble(txtCoordinateZ.Text),
                    Depth           = Convert.ToDouble(txtDepth.Text),
                    GasContentValue = Convert.ToDouble(txtGasContentValue.Text),
                    MeasureDateTime = dtpMeasureDateTime.Value,
                    Tunnel          = selectTunnelSimple1.SelectedTunnel,
                    CoalSeams       = (CoalSeams)cboCoalSeams.SelectedItem,
                    BindingId       = IDGenerator.NewBindingID()
                };
                // 坐标X
                gasContent.Save();
                DrawGasGushQuantityPt(gasContent);
            }
            else
            {
                GasContent.CoordinateX     = Convert.ToDouble(txtCoordinateX.Text);
                GasContent.CoordinateY     = Convert.ToDouble(txtCoordinateY.Text);
                GasContent.CoordinateZ     = Convert.ToDouble(txtCoordinateZ.Text);
                GasContent.Depth           = Convert.ToDouble(txtDepth.Text);
                GasContent.GasContentValue = Convert.ToDouble(txtGasContentValue.Text);
                GasContent.MeasureDateTime = dtpMeasureDateTime.Value;
                GasContent.Tunnel          = selectTunnelSimple1.SelectedTunnel;
                GasContent.CoalSeams       = (CoalSeams)cboCoalSeams.SelectedItem;
                GasContent.Save();
                DelGasGushQuantityPt(GasContent.BindingId, GasContent.CoalSeams.CoalSeamsName);
                DrawGasGushQuantityPt(GasContent);
            }
        }
Example #2
0
        /// <summary>
        ///     提交
        /// </summary>
        /// <params name="sender"></params>
        /// <params name="e"></params>
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;

            // 创建一个瓦斯含量点实体
            if (GasContent == null)
            {
                var gasContent = new GasContent
                {
                    coordinate_x      = Convert.ToDouble(txtCoordinateX.Text),
                    coordinate_y      = Convert.ToDouble(txtCoordinateY.Text),
                    coordinate_z      = Convert.ToDouble(txtCoordinateZ.Text),
                    depth             = Convert.ToDouble(txtDepth.Text),
                    gas_content_value = Convert.ToDouble(txtGasContentValue.Text),
                    measure_datetime  = dtpMeasureDateTime.Value,
                    tunnel            = selectTunnelSimple1.selected_tunnel,
                    bid = IdGenerator.NewBindingId()
                };
                // 坐标X
                gasContent.Save();
                DrawGasGushQuantityPt(gasContent);
            }
            else
            {
                GasContent.coordinate_x      = Convert.ToDouble(txtCoordinateX.Text);
                GasContent.coordinate_y      = Convert.ToDouble(txtCoordinateY.Text);
                GasContent.coordinate_z      = Convert.ToDouble(txtCoordinateZ.Text);
                GasContent.depth             = Convert.ToDouble(txtDepth.Text);
                GasContent.gas_content_value = Convert.ToDouble(txtGasContentValue.Text);
                GasContent.measure_datetime  = dtpMeasureDateTime.Value;
                GasContent.tunnel            = selectTunnelSimple1.selected_tunnel;
                GasContent.Save();
                DelGasGushQuantityPt(GasContent.bid);
                DrawGasGushQuantityPt(GasContent);
            }
        }
        /// <summary>
        ///     提交
        /// </summary>
        /// <params name="sender"></params>
        /// <params name="e"></params>
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;

            // 创建一个瓦斯含量点实体
            if (GasContent == null)
            {
                var gasContent = new GasContent
                {
                    coordinate_x = Convert.ToDouble(txtCoordinateX.Text),
                    coordinate_y = Convert.ToDouble(txtCoordinateY.Text),
                    coordinate_z = Convert.ToDouble(txtCoordinateZ.Text),
                    depth = Convert.ToDouble(txtDepth.Text),
                    gas_content_value = Convert.ToDouble(txtGasContentValue.Text),
                    measure_datetime = dtpMeasureDateTime.Value,
                    tunnel = selectTunnelSimple1.selected_tunnel,
                    bid = IdGenerator.NewBindingId()
                };
                // 坐标X
                gasContent.Save();
                DrawGasGushQuantityPt(gasContent);
            }
            else
            {
                GasContent.coordinate_x = Convert.ToDouble(txtCoordinateX.Text);
                GasContent.coordinate_y = Convert.ToDouble(txtCoordinateY.Text);
                GasContent.coordinate_z = Convert.ToDouble(txtCoordinateZ.Text);
                GasContent.depth = Convert.ToDouble(txtDepth.Text);
                GasContent.gas_content_value = Convert.ToDouble(txtGasContentValue.Text);
                GasContent.measure_datetime = dtpMeasureDateTime.Value;
                GasContent.tunnel = selectTunnelSimple1.selected_tunnel;
                GasContent.Save();
                DelGasGushQuantityPt(GasContent.bid);
                DrawGasGushQuantityPt(GasContent);
            }
        }