/// <summary>
        /// �޸Ľ������
        /// </summary>
        public void UpdateObject()
        {
            //��ȡ�������
            Substation_Info obj = FocusedObject;
            if (obj == null)
            {
                return;
            }
            if (obj.S4 == "no")
            { MessageBox.Show("���в����޸�!"); return; }
            //���������һ������
            Substation_Info objCopy = new Substation_Info();
            DataConverter.CopyTo<Substation_Info>(obj, objCopy);

            //ִ���޸IJ���
            using (FrmSubstation_InfoDialog_AHTL dlg = new FrmSubstation_InfoDialog_AHTL())
            {
                dlg.SetVisible();
                dlg.IsSelect = isselect;
                dlg.Type = types1;
                dlg.Flag = flags1;
                dlg.ctrlSubstation_Info = this;
                dlg.ProjectID = projectid;
                dlg.Object = objCopy;   //�󶨸���
                if (dlg.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
            }

            //�ø������½������
            DataConverter.CopyTo<Substation_Info>(objCopy, obj);
            this.bandedGridView1.BeginUpdate();
            CalcTotal();
            //ˢ�±��
            //gridControl.RefreshDataSource();
            this.bandedGridView1.EndUpdate();
        }
        /// <summary>
        /// ��Ӷ���
        /// </summary>
        public void AddObject()
        {
            //�����������Ƿ��Ѿ�����
            //if (ObjectList == null)
            //{
            //    return;
            //}
            //�½�����
            Substation_Info obj = new Substation_Info();
            obj.Flag = flags1;
            obj.CreateDate = DateTime.Now;
            //obj.L1 = 100;
            //obj.L2 = 100;
            //obj.L3 = 100;

            //ִ����Ӳ���
            using (FrmSubstation_InfoDialog_AHTL dlg = new FrmSubstation_InfoDialog_AHTL())
            {
                dlg.SetVisible();
                dlg.Type = types1;
                dlg.Flag = flags1;
                dlg.ctrlSubstation_Info = this;
                dlg.ProjectID = projectid;
                dlg.IsCreate = true;    //�����½���־
                dlg.Object = obj;
                if (dlg.ShowDialog() != DialogResult.OK)
                {

                    return;
                }
            }
            this.bandedGridView1.BeginUpdate();
            CalcTotal();
            //CalcTotal(" order by convert(int,L1) desc,AreaName desc,S4,CreateDate,convert(int,S5) ");
            this.bandedGridView1.EndUpdate();
            //���¶�����뵽������
            //ObjectList.Add(obj);

            ////ˢ�±�񣬲��������ж�λ���¶����ϡ�
            //gridControl.RefreshDataSource();
            //GridHelper.FocuseRow(this.bandedGridView1, obj);
        }