Ejemplo n.º 1
0
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                FrmNewClass frm = new FrmNewClass();
                frm.Type  = type;
                frm.Flag  = flag;
                frm.Type2 = "SubstationGuiHua";



                if (frm.ShowDialog() == DialogResult.OK)
                {
                    InitValues();
                }

                //if (frm.ShowDialog() == DialogResult.OK)
                //{
                //    foreach (GridColumn gc in this.ctrlSubstation_Info1.GridView.Columns)
                //    {
                //        if (gc.FieldName == frm.ClassType)
                //        {
                //            gc.Caption = frm.ClassName;
                //            gc.Visible = true;
                //            gc.OptionsColumn.ShowInCustomizationForm = true;
                //        }
                //    }
                //}
            }
            catch (Exception ex) { MsgBox.Show(ex.Message); }
        }
Ejemplo n.º 2
0
        private void barButtonItem3_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            GridColumn gc = this.ctrlSubstation_Info1.GridView.FocusedColumn;

            if (gc == null)
            {
                return;
            }

            if (gc.FieldName.Substring(0, 1) != "S")
            {
                return;
            }

            FrmNewClass frm = new FrmNewClass();

            frm.ClassName = gc.Caption;
            frm.ClassType = gc.FieldName;
            frm.Type      = type;
            frm.Flag      = flag;
            frm.Type2     = "SubstationGuiHua";
            frm.IsUpdate  = true;

            if (frm.ShowDialog() == DialogResult.OK)
            {
                //gc.Caption = frm.ClassName;
                InitValues();
            }
        }
Ejemplo n.º 3
0
        private void barButtonItem3_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                FrmNewClass frm = new FrmNewClass();
                frm.Type  = type;
                frm.Flag  = flag;
                frm.Type2 = type2;

                if (frm.ShowDialog() == DialogResult.OK)
                {
                    InitVisuble();
                }
            }
            catch (Exception ex) { MsgBox.Show(ex.Message); }
        }
Ejemplo n.º 4
0
        private void barButtonItem3_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            GridColumn gc = this.ctrlSubstation_Info1.GridView.FocusedColumn;
            if (gc == null)
                return;

            if (gc.FieldName.Substring(0, 1) != "S")
                return;

            FrmNewClass frm = new FrmNewClass();
            frm.ClassName = gc.Caption;
            frm.ClassType = gc.FieldName;
            frm.Type = type;
            frm.Flag = flag;
            frm.Type2 = "SubstationGuiHua";
            frm.IsUpdate = true;

            if (frm.ShowDialog() == DialogResult.OK)
            {
                //gc.Caption = frm.ClassName;
                InitValues();
            }
        }
Ejemplo n.º 5
0
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                FrmNewClass frm = new FrmNewClass();
                frm.Type = type;
                frm.Flag = flag;
                frm.Type2 = "SubstationGuiHua";

                if (frm.ShowDialog() == DialogResult.OK)
                {
                    InitValues();
                }

                //if (frm.ShowDialog() == DialogResult.OK)
                //{
                //    foreach (GridColumn gc in this.ctrlSubstation_Info1.GridView.Columns)
                //    {
                //        if (gc.FieldName == frm.ClassType)
                //        {
                //            gc.Caption = frm.ClassName;
                //            gc.Visible = true;
                //            gc.OptionsColumn.ShowInCustomizationForm = true;
                //        }
                //    }
                //}

            }
            catch (Exception ex) { MsgBox.Show(ex.Message); }
        }