Exemplo n.º 1
0
        private void btnVibro_Click(object sender, EventArgs e)
        {
            /*if (MainGridView.FocusedRowHandle < 0)
             * {
             *  MyLocalizer.XtraMessageBoxShow("Необходимо указать оборудование.", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             *  return;
             * }
             *
             * DataRowView drv = (DataRowView)(qMainEquipmentsBindingSource.Current);
             * long id = Convert.ToInt64(drv.Row["EquipmentID"]);
             * ShowVibroForm(id, true);
             * */

            if (MainGridView.FocusedRowHandle < 0)
            {
                MyLocalizer.XtraMessageBoxShow("Необходимо указать оборудование.", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            DataRowView drv = (DataRowView)(qMainEquipmentsBindingSource.Current);
            long        id  = Convert.ToInt64(drv.Row["EquipmentID"]);

            InspectionForm form = new InspectionForm(id, Inspection.InspectionType.Vibro);

            form.ShowDialog(this);
        }
Exemplo n.º 2
0
        private void controlNavigator2_ButtonClick(object sender, NavigatorButtonClickEventArgs e)
        {
            if (e.Button.ButtonType == NavigatorButtonType.Custom)
            {
                e.Handled = true;

                if (GridView.FocusedRowHandle < 0)
                {
                    MyLocalizer.XtraMessageBoxShow("Необходимо указать оборудование.", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                DataRowView drv = (DataRowView)(qEquipmentsBindingSource.Current);
                long        id  = Convert.ToInt64(drv.Row["EquipmentID"]);

                if (e.Button.Tag.ToString() == "Visual")
                {
                    InspectionForm form = new InspectionForm(id, Inspection.InspectionType.Visual);
                    form.ShowDialog(this);
                }
                if (e.Button.Tag.ToString() == "FHA")
                {
                    InspectionForm form = new InspectionForm(id, Inspection.InspectionType.FHA);
                    form.ShowDialog(this);
                }
                if (e.Button.Tag.ToString() == "HARG")
                {
                    InspectionForm form = new InspectionForm(id, Inspection.InspectionType.HARG);
                    form.ShowDialog(this);
                }
                if (e.Button.Tag.ToString() == "Warm")
                {
                    InspectionForm form = new InspectionForm(id, Inspection.InspectionType.Warm);
                    form.ShowDialog(this);
                }
                if (e.Button.Tag.ToString() == "Vibro")
                {
                    InspectionForm form = new InspectionForm(id, Inspection.InspectionType.Vibro);
                    form.ShowDialog(this);
                }
                if (e.Button.Tag.ToString() == "Parameter")
                {
                    InspectionForm form = new InspectionForm(id, Inspection.InspectionType.Parameter);
                    form.ShowDialog(this);
                }
                if (e.Button.Tag.ToString() == "Electrical")
                {
                    InspectionForm form = new InspectionForm(id, Inspection.InspectionType.Electrical);
                    form.ShowDialog(this);
                }

                return;
            }
        }
Exemplo n.º 3
0
        private void WarmSubMenu_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (MainGridView.FocusedRowHandle < 0)
            {
                MyLocalizer.XtraMessageBoxShow("Необходимо указать оборудование.", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            DataRowView drv = (DataRowView)(qMainEquipmentsBindingSource.Current);
            long        id  = Convert.ToInt64(drv.Row["EquipmentID"]);

            InspectionForm form = new InspectionForm(id, Inspection.InspectionType.Warm);

            form.ShowDialog(this);
        }