private void bh_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            frmSubSelS f = new frmSubSelS();

            if (getSubType(LabelTxt) == "规划")
            {
                f.ReDate(layerID, false, false, getLvl(LabelTxt));
            }
            else
            {
                f.ReDate("", true, false, getLvl(LabelTxt));
            }
            if (f.ShowDialog() == DialogResult.OK)
            {
                p           = f.ctrlSubstation_Info1.FocusedObject;
                sub.EleName = p.Title;
                if (p.L2 == null || p.L2 == 0)
                {
                    sub.Number = 0;
                }
                else
                {
                    sub.Number = Convert.ToDecimal(p.L2);
                }
                sub.ObligateField2 = p.L1.ToString();
                if (p.L9 == null || p.L9 == 0)
                {
                    sub.Burthen = 0;
                }
                else
                {
                    sub.Burthen = Convert.ToDecimal(p.L9);
                }


                bh.Text       = sub.EleName;
                fhl.EditValue = sub.ObligateField2;
                Maxfh.Text    = sub.Burthen.ToString("#####.##");
                dl.Text       = sub.Number.ToString("#####.##");
                OldUID        = p.Code;
                p.Code        = sub.UID;
                SubUpdate     = true;
            }
        }
Пример #2
0
        private void bh_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            frmSubSelS f = new frmSubSelS();
            if (getSubType(LabelTxt) == "规划")
            {
                f.ReDate(layerID, false, false, getLvl(LabelTxt));
            }
            else
            {
                f.ReDate("", true, false, getLvl(LabelTxt));
            }
            if (f.ShowDialog() == DialogResult.OK)
            {
                p = f.ctrlSubstation_Info1.FocusedObject;
                sub.EleName = p.Title;
                if (p.L2 == null || p.L2==0)
                {
                    sub.Number = 0;
                }
                else
                {
                    sub.Number = Convert.ToDecimal(p.L2);
                }
                sub.ObligateField2 = p.L1.ToString();
                if (p.L9 == null || p.L9==0)
                {
                    sub.Burthen = 0;
                }
                else
                {
                    sub.Burthen = Convert.ToDecimal(p.L9);
                }

                bh.Text = sub.EleName;
                fhl.EditValue = sub.ObligateField2;
                Maxfh.Text = sub.Burthen.ToString("#####.##");
                dl.Text = sub.Number.ToString("#####.##");
                OldUID = p.Code;
                p.Code = sub.UID;
                SubUpdate = true;
            }
        }