Exemplo n.º 1
0
        private void buttonDeleteSimply_Click(object sender, EventArgs e)
        {
            string DS_building      = comboBoxBuilding0.Text.ToString();
            string DS_Floor         = comboBoxFloor0.Text.ToString();
            string DS_Closet        = comboBoxCloset0.Text.ToString();
            string DS_Panel         = comboBoxPanel0.Text.ToString();
            string DS_Panel_port    = comboBoxPanelPort0.Text.ToString();
            string DS_Stack         = comboBoxStack0.Text.ToString();
            string DS_IPSwitch      = textSimplyDelIPSwitch0.Text.ToString();
            string DS_Worder        = textSimplyDelWorder0.Text.ToString();
            bool   VDS_building     = Common.ValidadorCamposVacios(DS_building, "Building");
            bool   VDS_Floor        = Common.ValidadorCamposVacios(DS_Floor, "Floor");
            bool   VDS_Closet       = Common.ValidadorCamposVacios(DS_Closet, "Closet");
            bool   VDS_Panel        = Common.ValidadorCamposVacios(DS_Panel, "Panel");
            bool   VDS_Panel_port   = Common.ValidadorCamposVacios(DS_Panel_port, "Panel");
            bool   VDS_Stack        = Common.ValidadorCamposVacios(DS_Stack, "Stack");
            bool   VDS_IPSwitch     = Common.ValidadorCamposVacios(DS_IPSwitch, "IP switch");
            bool   Vexists_IPSwitch = Sentencias.ValidarDatoExistente("patching", "IP_Switch", DS_IPSwitch);
            bool   VDS_Worder       = Common.ValidadorCamposVacios(DS_Worder, "Work Order");

            if (Vexists_IPSwitch == false)
            {
                MessageBox.Show("The IP Switch no exists! ");
            }
            if (VDS_building == true && VDS_Floor == true && VDS_Closet == true && VDS_Panel == true && VDS_Panel_port == true &&
                VDS_Stack == true && VDS_IPSwitch == true && VDS_Worder == true && Vexists_IPSwitch == true)
            {
                Sentencias.Delete_field_patching(DS_building, DS_Floor, DS_Closet, DS_Panel, DS_Panel_port, DS_Stack, DS_IPSwitch, DS_Worder);
            }
        }