/// <summary>
        ///     提交按钮
        /// </summary>
        /// <params name="sender"></params>
        /// <params name="e"></params>
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            var collapsePillar =
                CollapsePillar.FindAllByProperty("name", txtCollapsePillarsName.Text).FirstOrDefault();
            if (collapsePillar == null)
            {
                collapsePillar = new CollapsePillar
                {
                    name = txtCollapsePillarsName.Text,
                    discribe = txtDescribe.Text,
                    xtype = radioBtnX.Checked ? "0" : "1",
                    bid = IdGenerator.NewBindingId()
                };
            }
            else
            {
                collapsePillar.name = txtCollapsePillarsName.Text;
                collapsePillar.discribe = txtDescribe.Text;
                collapsePillar.xtype = radioBtnX.Checked ? "0" : "1";
            }

            //实体赋值
            //去除无用空行
            for (int i = 0; i < dgrdvCoordinate.RowCount - 1; i++)
            {
                if (dgrdvCoordinate.Rows[i].Cells[0].Value == null &&
                    dgrdvCoordinate.Rows[i].Cells[1].Value == null &&
                    dgrdvCoordinate.Rows[i].Cells[2].Value == null)
                {
                    dgrdvCoordinate.Rows.RemoveAt(i);
                }
            }
            collapsePillar.Save();

            //添加关键点
            List<CollapsePillarPoint> collapsePillarPoints = new List<CollapsePillarPoint>();
            for (int i = 0; i < dgrdvCoordinate.RowCount - 1; i++)
            {

                var collapsePillarPoint = new CollapsePillarPoint
                {
                    coordinate_x = Convert.ToDouble(dgrdvCoordinate[0, i].Value),
                    coordinate_y = Convert.ToDouble(dgrdvCoordinate[1, i].Value),
                    coordinate_z = Convert.ToDouble(dgrdvCoordinate[2, i].Value),
                    bid = IdGenerator.NewBindingId(),
                    collapse_pillar = collapsePillar
                };
                collapsePillarPoints.Add(collapsePillarPoint);
                collapsePillarPoint.Save();
            }

            ModifyXlz(collapsePillarPoints, collapsePillar.bid);
            DialogResult = DialogResult.OK;
        }