private void fillFields() { //Llena los campos desde la tabla datosprotocoloigm datosprotocoloigmzika data = DatosProtocoloIgMZika.TraerDatosprotocoloigmzika(); txt_LoteIgM.Text = data.LoteIgM; txt_LoteAntigeno.Text = data.LoteAntigeno; if (data.fechafijIGM != null) { date_Fijacion.Value = data.fechafijIGM.Value; } if (data.VolUsadoIGM != null) { txt_Volumen.Text = data.VolUsadoIGM.Value.ToString(); } cmb_TipoEstudio.SelectedIndex = cmb_TipoEstudio.FindString(data.TipoEstudio); cmb_ProcH2O.SelectedIndex = cmb_ProcH2O.FindString(data.ProcH2O); txt_Coatting.Text = data.Coatting; txt_PB.Text = data.PB; txt_Tipo.Text = data.TB; if (data.FB != null) { date_Fecha.Value = data.FB.Value; } txt_Temp.Text = data.TMPB.ToString(); txt_Tiempo.Text = data.TIMEB; txt_Conjug.Text = data.Conjugado; txt_SHN.Text = data.SHN; txt_STOP.Text = data.STOP; txt_SUBST.Text = data.Substrato; if (data.TSubstrato != null) { txt_TiempoSubs.Text = data.TSubstrato.Value.ToString(); } txt_FactorP.Text = Convert.ToString(data.Factor); txt_FactorS.Text = Convert.ToString(data.Factor2); txt_ControlPos.Text = data.ControlPos; txt_ControlNeg.Text = data.ControlNeg; txt_ControlNegLI.Text = data.ControlNegLI.ToString(); txt_ControlNegLS.Text = data.ControlNegLS.ToString(); txt_ControlPosRadio.Text = data.ControlRadPos; txt_ControlPosRadioLI.Text = data.ControlPosRadLI.ToString(); txt_ControlPosRadioLS.Text = data.ControlPosRadLS.ToString(); txt_ControlNegRadio.Text = data.ControlRadNeg; txt_ControlNegRadioLI.Text = data.ControlNegRadLI.ToString(); txt_ControlNegRadioLS.Text = data.ControlNegRadLS.ToString(); if (Principal.ControlP) { Check(false); } else { Check(true); } }
public static void updateprotocoloIgMZika(datosprotocoloigmzika data) { try { using (var context = new elisaEntities2()) { datosprotocoloigmzika datos = context.datosprotocoloigmzikas.Single(x => x.idDatosProtocoloIgM == 1); datos.LoteIgM = data.LoteIgM; datos.LoteAntigeno = data.LoteAntigeno; datos.VolUsadoIGM = data.VolUsadoIGM; datos.TipoEstudio = data.TipoEstudio; datos.ProcH2O = data.ProcH2O; datos.TB = data.TB; datos.TMPB = data.TMPB; datos.TIMEB = data.TIMEB; datos.PB = data.PB; datos.Coatting = data.Coatting; datos.LoteAntigeno = data.LoteAntigeno; datos.SHN = data.SHN; datos.STOP = data.STOP; datos.Substrato = data.Substrato; datos.TSubstrato = data.TSubstrato; datos.Conjugado = data.Conjugado; datos.FB = data.FB; datos.fechafijIGM = data.fechafijIGM; datos.ControlPos = data.ControlPos; datos.ControlNeg = data.ControlNeg; datos.ControlNegLI = data.ControlNegLI; datos.ControlNegLS = data.ControlNegLS; datos.ControlNegRadLI = data.ControlNegRadLI; datos.ControlRadPos = data.ControlRadPos; datos.ControlPosRadLI = data.ControlPosRadLI; datos.ControlPosRadLS = data.ControlPosRadLS; datos.ControlRadNeg = data.ControlRadNeg; datos.ControlNegRadLS = data.ControlNegRadLS; datos.ControlNegRadLI = data.ControlNegRadLI; datos.Factor = data.Factor; datos.Factor2 = data.Factor2; context.SaveChanges(); Task.Run(() => { MessageBox.Show("Ha sido actualizado correctamente"); }); } } catch (Exception ex) { MessageBox.Show("Ha ocurrido un problema conectando a la base de datos.\n Por favor contacte al administrador del Sistema", "Error detectado"); Log.logError("Error capturado: update IgMZika: " + ex.StackTrace); } }
public static void InitializeExcelWorkSheet(Principal principal, string testName) { Excel.Application MyApp = new Excel.Application(); MyApp.Visible = false; object misValue = System.Reflection.Missing.Value; Excel.Workbook xlWorkBook = MyApp.Workbooks.Add(misValue); Excel.Worksheet xlWorkSheet = (Excel.Worksheet)xlWorkBook.Sheets[1]; switch ((Test)principal.selectedTest) { case Test.IgMDengue: { printHeader(xlWorkSheet, principal, testName); printLecturas(xlWorkSheet, principal); printUnidades(xlWorkSheet, principal); printResultados(xlWorkSheet, principal); xlWorkSheet.get_Range("A40").Value = "Valor de Corte: "; xlWorkSheet.get_Range("A40").Font.Bold = true; xlWorkSheet.get_Range("A41").Value = "Validación: "; xlWorkSheet.get_Range("A41").Font.Bold = true; xlWorkSheet.get_Range("A42").Value = "Valor Control Positivo Bajo: "; xlWorkSheet.get_Range("A42").Font.Bold = true; xlWorkSheet.get_Range("D40").Value = principal.txt_val1.Text; xlWorkSheet.get_Range("D41").Value = principal.txt_val7.Text; xlWorkSheet.get_Range("D42").Value = principal.txt_val5.Text; datosprotocoloigm datos = DatosProtocoloIgM.TraerDatosProtocoloIgM(); xlWorkSheet.get_Range("F40").Value = "Codigo de Controles: "; xlWorkSheet.get_Range("H40").Value = "CPA: "; xlWorkSheet.get_Range("H40").Font.Bold = true; xlWorkSheet.get_Range("H41").Value = "CPB: "; xlWorkSheet.get_Range("H41").Font.Bold = true; xlWorkSheet.get_Range("H42").Value = "CN: "; xlWorkSheet.get_Range("H42").Font.Bold = true; xlWorkSheet.get_Range("I40").Value = datos.ControlPosA; xlWorkSheet.get_Range("I41").Value = datos.ControlPosB; xlWorkSheet.get_Range("I42").Value = datos.ControlNeg; if (principal.cb.Checked) { xlWorkSheet.get_Range("J40").Value = "Controles de Radio: "; xlWorkSheet.get_Range("L40").Value = "CRP: "; xlWorkSheet.get_Range("L41").Value = "CRN: "; xlWorkSheet.get_Range("L40").Font.Bold = true; xlWorkSheet.get_Range("L41").Font.Bold = true; xlWorkSheet.get_Range("M40").Value = datos.ControlRadPos; xlWorkSheet.get_Range("M41").Value = datos.ControlRadNeg; } xlWorkSheet.get_Range("A44").Value = "ANTI-GLOBULINA"; xlWorkSheet.get_Range("C44").Value = datos.LoteIgM; // Function Datos xlWorkSheet.get_Range("A44:M50").Font.Size = 8; xlWorkSheet.get_Range("A44:A48").Font.Bold = true; xlWorkSheet.get_Range("E44:E48").Font.Bold = true; xlWorkSheet.get_Range("H44:H48").Font.Bold = true; xlWorkSheet.get_Range("K44:K48").Font.Bold = true; xlWorkSheet.get_Range("A45").Value = "ESTUDIO"; xlWorkSheet.get_Range("C45").Value = datos.TipoEstudio; xlWorkSheet.get_Range("A46").Value = "COATTING"; xlWorkSheet.get_Range("C46").Value = datos.Coatting; xlWorkSheet.get_Range("A47").Value = "PB"; xlWorkSheet.get_Range("C47").Value = datos.PB; xlWorkSheet.get_Range("A48").Value = "H2O"; xlWorkSheet.get_Range("C48").Value = datos.ProcH2O; if (!xlWorkSheet.get_Range("A44").Value.Equals("GOAT ANTI-HUMAN IgM")) { xlWorkSheet.get_Range("E44").Value = "GAMMAGLOBULINA"; xlWorkSheet.get_Range("E45").Value = "LOTE"; xlWorkSheet.get_Range("F45").Value = datos.GGLOB; xlWorkSheet.get_Range("E46").Value = "FECHA"; xlWorkSheet.get_Range("F46").Value = "-" + datos.fechafijGG.Value.ToString("dd/MM/yyyy") + "-"; xlWorkSheet.get_Range("E47").Value = "VOLUMEN"; xlWorkSheet.get_Range("F47").Value = datos.VolUsado; } else { xlWorkSheet.get_Range("E44").Value = "Fijacion Igm"; xlWorkSheet.get_Range("E46").Value = "FECHA"; xlWorkSheet.get_Range("F46").Value = "-" + datos.fechafijGG.Value.ToString("dd/MM/yyyy") + "-"; xlWorkSheet.get_Range("E47").Value = "VOLUMEN"; xlWorkSheet.get_Range("F47").Value = datos.VolUsado; } xlWorkSheet.get_Range("E48").Value = ""; xlWorkSheet.get_Range("H44").Value = "BLOQUEO"; xlWorkSheet.get_Range("H45").Value = "TIPO"; xlWorkSheet.get_Range("I45").Value = datos.TB; xlWorkSheet.get_Range("H46").Value = "FECHA"; xlWorkSheet.get_Range("I46").Value = "-" + datos.FB.Value.ToString("dd/MM/yyyy") + "-"; xlWorkSheet.get_Range("H47").Value = "TEMP"; xlWorkSheet.get_Range("I47").Value = datos.TMPB; xlWorkSheet.get_Range("H48").Value = "TIEMPO"; xlWorkSheet.get_Range("I48").Value = "-" + datos.TIMEB + "-"; xlWorkSheet.get_Range("K44").Value = "ANTIGENO"; xlWorkSheet.get_Range("L44").Value = datos.LoteAntigeno; xlWorkSheet.get_Range("K45").Value = "CONJUGA"; xlWorkSheet.get_Range("L45").Value = datos.Conjugado; xlWorkSheet.get_Range("K46").Value = "SHN"; xlWorkSheet.get_Range("L46").Value = datos.SHN; xlWorkSheet.get_Range("K47").Value = "SUBSTRAT"; xlWorkSheet.get_Range("L47").Value = datos.Substrato; xlWorkSheet.get_Range("K48").Value = "Tiempo Subs"; xlWorkSheet.get_Range("L48").Value = datos.TSubstrato; xlWorkSheet.get_Range("K49").Value = "STOP"; xlWorkSheet.get_Range("L49").Value = datos.STOP; //End of Function string nombreArchivo = BASE_DIR + testName + " " + DateTime.Now.ToString("dd-MM-yyyy") + " " + principal.txt_Placa.TextBox.Text + ".xls"; xlWorkBook.SaveAs(nombreArchivo); xlWorkBook.Close(true); MyApp.Quit(); } break; case Test.IgMZika: { printUnidades(xlWorkSheet, principal); printResultados(xlWorkSheet, principal); //Formato_Excel_IgMZika xlWorkSheet.get_Range("A40").Value = "Valor de Corte: "; xlWorkSheet.get_Range("A40").Font.Bold = true; xlWorkSheet.get_Range("A41").Value = "Media Controles Neg: "; xlWorkSheet.get_Range("A41").Font.Bold = true; xlWorkSheet.get_Range("A42").Value = "Validación: "; xlWorkSheet.get_Range("A42").Font.Bold = true; xlWorkSheet.get_Range("D40").Value = principal.txt_val1.Text; xlWorkSheet.get_Range("D41").Value = principal.txt_val6.Text; xlWorkSheet.get_Range("D42").Value = principal.txt_val7.Text; datosprotocoloigmzika datos = DatosProtocoloIgMZika.TraerDatosprotocoloigmzika(); xlWorkSheet.get_Range("F40").Value = "Codigo de Controles: "; xlWorkSheet.get_Range("H40").Value = "CP: "; xlWorkSheet.get_Range("H40").Font.Bold = true; xlWorkSheet.get_Range("H41").Value = "CN: "; xlWorkSheet.get_Range("H41").Font.Bold = true; xlWorkSheet.get_Range("H42").Font.Bold = true; xlWorkSheet.get_Range("I40").Value = datos.ControlPos; xlWorkSheet.get_Range("I41").Value = datos.ControlNeg; if (principal.cb.Checked) { xlWorkSheet.get_Range("J40").Value = "Controles de Radio: "; xlWorkSheet.get_Range("L40").Value = "CRP: "; xlWorkSheet.get_Range("L41").Value = "CRN: "; xlWorkSheet.get_Range("L40").Font.Bold = true; xlWorkSheet.get_Range("L41").Font.Bold = true; xlWorkSheet.get_Range("M40").Value = datos.ControlRadPos; xlWorkSheet.get_Range("M41").Value = datos.ControlRadNeg; } xlWorkSheet.get_Range("A44").Value = "GOAT ANTI-HUMAN IgM"; xlWorkSheet.get_Range("C44").Value = datos.LoteIgM; // Function Datos xlWorkSheet.get_Range("A44:M50").Font.Size = 8; xlWorkSheet.get_Range("A44:A48").Font.Bold = true; xlWorkSheet.get_Range("E44:E48").Font.Bold = true; xlWorkSheet.get_Range("H44:H48").Font.Bold = true; xlWorkSheet.get_Range("K44:K48").Font.Bold = true; xlWorkSheet.get_Range("A45").Value = "ESTUDIO"; xlWorkSheet.get_Range("C45").Value = datos.TipoEstudio; xlWorkSheet.get_Range("A46").Value = "COATTING"; xlWorkSheet.get_Range("C46").Value = datos.Coatting; xlWorkSheet.get_Range("A47").Value = "PB"; xlWorkSheet.get_Range("C47").Value = datos.PB; xlWorkSheet.get_Range("A48").Value = "H2O"; xlWorkSheet.get_Range("C48").Value = datos.ProcH2O; xlWorkSheet.get_Range("E44").Value = "Fijacion IgM"; xlWorkSheet.get_Range("E46").Value = "FECHA"; xlWorkSheet.get_Range("F46").Value = "-" + datos.fechafijIGM.Value.ToString("dd/MM/yyyy") + "-"; xlWorkSheet.get_Range("E47").Value = "VOLUMEN"; xlWorkSheet.get_Range("F47").Value = datos.VolUsadoIGM; xlWorkSheet.get_Range("E48").Value = ""; xlWorkSheet.get_Range("H44").Value = "BLOQUEO"; xlWorkSheet.get_Range("H45").Value = "TIPO"; xlWorkSheet.get_Range("I45").Value = datos.TB; xlWorkSheet.get_Range("H46").Value = "FECHA"; xlWorkSheet.get_Range("I46").Value = "-" + datos.FB.Value.ToString("dd/MM/yyyy") + "-"; xlWorkSheet.get_Range("H47").Value = "TEMP"; xlWorkSheet.get_Range("I47").Value = datos.TMPB; xlWorkSheet.get_Range("H48").Value = "TIEMPO"; xlWorkSheet.get_Range("I48").Value = "-" + datos.TIMEB + "-"; xlWorkSheet.get_Range("K44").Value = "ANTIGENO"; xlWorkSheet.get_Range("L44").Value = datos.LoteAntigeno; xlWorkSheet.get_Range("K45").Value = "CONJUGA"; xlWorkSheet.get_Range("L45").Value = datos.Conjugado; xlWorkSheet.get_Range("K46").Value = "SHN"; xlWorkSheet.get_Range("L46").Value = datos.SHN; xlWorkSheet.get_Range("K47").Value = "SUBSTRAT"; xlWorkSheet.get_Range("L47").Value = datos.Substrato; xlWorkSheet.get_Range("K48").Value = "Tiempo Subs"; xlWorkSheet.get_Range("L48").Value = datos.TSubstrato; xlWorkSheet.get_Range("K49").Value = "STOP"; xlWorkSheet.get_Range("L49").Value = datos.STOP; //End of Function //Pagina1 xlWorkSheet.PageSetup.CenterHorizontally = true; xlWorkSheet.PageSetup.CenterVertically = true; xlWorkSheet.PageSetup.Orientation = Excel.XlPageOrientation.xlLandscape; xlWorkSheet.PageSetup.Zoom = false; xlWorkSheet.PageSetup.FitToPagesWide = 1; xlWorkSheet.PageSetup.FitToPagesTall = 1; xlWorkSheet.PageSetup.LeftMargin = MyApp.InchesToPoints(0.196850393700787); xlWorkSheet.PageSetup.RightMargin = MyApp.InchesToPoints(0.196850393700787); xlWorkSheet.PageSetup.TopMargin = MyApp.InchesToPoints(0.393700787401575); xlWorkSheet.PageSetup.BottomMargin = MyApp.InchesToPoints(0.393700787401575); xlWorkSheet.PageSetup.HeaderMargin = MyApp.InchesToPoints(0); xlWorkSheet.PageSetup.FooterMargin = MyApp.InchesToPoints(0); //Crear Pagina 2 Excel.Worksheet xlWorkSheet1 = (Excel.Worksheet)MyApp.Worksheets.Add(misValue, xlWorkSheet); //Formato_Excel_Protocolo_2 printHeader(xlWorkSheet1, principal, testName); printLecturas(xlWorkSheet1, principal); printUnidades(xlWorkSheet1, principal); printResultados2(xlWorkSheet1, principal); //Formato_Excel_IgMZika xlWorkSheet1.get_Range("A40").Value = "Valor de Corte: "; xlWorkSheet1.get_Range("A40").Font.Bold = true; xlWorkSheet1.get_Range("A41").Value = "Media Controles Neg: "; xlWorkSheet1.get_Range("A41").Font.Bold = true; xlWorkSheet1.get_Range("A42").Value = "Validación: "; xlWorkSheet1.get_Range("A42").Font.Bold = true; xlWorkSheet1.get_Range("D40").Value = principal.txt_val2.Text; xlWorkSheet1.get_Range("D41").Value = principal.txt_val6.Text; xlWorkSheet1.get_Range("D42").Value = principal.txt_val7.Text; xlWorkSheet1.get_Range("F40").Value = "Codigo de Controles: "; xlWorkSheet1.get_Range("H40").Value = "CP: "; xlWorkSheet1.get_Range("H40").Font.Bold = true; xlWorkSheet1.get_Range("H41").Value = "CN: "; xlWorkSheet1.get_Range("H41").Font.Bold = true; xlWorkSheet1.get_Range("H42").Font.Bold = true; xlWorkSheet1.get_Range("I40").Value = datos.ControlPos; xlWorkSheet1.get_Range("I41").Value = datos.ControlNeg; if (principal.cb.Checked) { xlWorkSheet1.get_Range("J40").Value = "Controles de Radio: "; xlWorkSheet1.get_Range("L40").Value = "CRP: "; xlWorkSheet1.get_Range("L41").Value = "CRN: "; xlWorkSheet1.get_Range("L40").Font.Bold = true; xlWorkSheet1.get_Range("L41").Font.Bold = true; xlWorkSheet1.get_Range("M40").Value = datos.ControlRadPos; xlWorkSheet1.get_Range("M41").Value = datos.ControlRadNeg; } xlWorkSheet1.get_Range("A44").Value = "GOAT ANTI-HUMAN IgM"; xlWorkSheet1.get_Range("C44").Value = datos.LoteIgM; xlWorkSheet1.get_Range("A44:M50").Font.Size = 8; xlWorkSheet1.get_Range("A44:A48").Font.Bold = true; xlWorkSheet1.get_Range("E44:E48").Font.Bold = true; xlWorkSheet1.get_Range("H44:H48").Font.Bold = true; xlWorkSheet1.get_Range("K44:K48").Font.Bold = true; xlWorkSheet1.get_Range("A45").Value = "ESTUDIO"; xlWorkSheet1.get_Range("C45").Value = datos.TipoEstudio; xlWorkSheet1.get_Range("A46").Value = "COATTING"; xlWorkSheet1.get_Range("C46").Value = datos.Coatting; xlWorkSheet1.get_Range("A47").Value = "PB"; xlWorkSheet1.get_Range("C47").Value = datos.PB; xlWorkSheet1.get_Range("A48").Value = "H2O"; xlWorkSheet1.get_Range("C48").Value = datos.ProcH2O; xlWorkSheet1.get_Range("E44").Value = "Fijacion IgM"; xlWorkSheet1.get_Range("E46").Value = "FECHA"; xlWorkSheet1.get_Range("F46").Value = "-" + datos.fechafijIGM.Value.ToString("dd/MM/yyyy") + "-"; xlWorkSheet1.get_Range("E47").Value = "VOLUMEN"; xlWorkSheet1.get_Range("F47").Value = datos.VolUsadoIGM; xlWorkSheet1.get_Range("E48").Value = ""; xlWorkSheet1.get_Range("H44").Value = "BLOQUEO"; xlWorkSheet1.get_Range("H45").Value = "TIPO"; xlWorkSheet1.get_Range("I45").Value = datos.TB; xlWorkSheet1.get_Range("H46").Value = "FECHA"; xlWorkSheet1.get_Range("I46").Value = "-" + datos.FB.Value.ToString("dd/MM/yyyy") + "-"; xlWorkSheet1.get_Range("H47").Value = "TEMP"; xlWorkSheet1.get_Range("I47").Value = datos.TMPB; xlWorkSheet1.get_Range("H48").Value = "TIEMPO"; xlWorkSheet1.get_Range("I48").Value = "-" + datos.TIMEB + "-"; xlWorkSheet1.get_Range("K44").Value = "ANTIGENO"; xlWorkSheet1.get_Range("L44").Value = datos.LoteAntigeno; xlWorkSheet1.get_Range("K45").Value = "CONJUGA"; xlWorkSheet1.get_Range("L45").Value = datos.Conjugado; xlWorkSheet1.get_Range("K46").Value = "SHN"; xlWorkSheet1.get_Range("L46").Value = datos.SHN; xlWorkSheet1.get_Range("K47").Value = "SUBSTRAT"; xlWorkSheet1.get_Range("L47").Value = datos.Substrato; xlWorkSheet1.get_Range("K48").Value = "Tiempo Subs"; xlWorkSheet1.get_Range("L48").Value = datos.TSubstrato; xlWorkSheet1.get_Range("K49").Value = "STOP"; xlWorkSheet1.get_Range("L49").Value = datos.STOP; string nombreArchivo = BASE_DIR + testName + " " + DateTime.Now.ToString("dd-MM-yyyy") + " " + principal.txt_Placa.TextBox.Text + ".xls"; xlWorkBook.SaveAs(nombreArchivo); xlWorkBook.Close(true); MyApp.Quit(); } break; case Test.ELISAINHMonoChik: case Test.ELISARMCohAnualChik: case Test.ELISARMCohAnualChikDup: case Test.ELISARMSeroChikDup: case Test.ELISARMSeroChik: { } break; } }
private void btn_Aceptar_Click(object sender, EventArgs e) { bool allchecked = true; //Guardar los parametros en la tabla ProtocoloIgM foreach (CheckBox checkBox in listaCheck) { if (!checkBox.Checked) { allchecked = false; } } try { //Guardar los datos del protocolo datosprotocoloigmzika nuevo = new datosprotocoloigmzika(); nuevo.LoteIgM = txt_LoteIgM.Text; nuevo.LoteAntigeno = txt_LoteAntigeno.Text; nuevo.VolUsadoIGM = float.Parse(txt_Volumen.Text); estudio selectedestudio = (estudio)cmb_TipoEstudio.SelectedValue; nuevo.TipoEstudio = selectedestudio.Estudio1; proch20 seelctedProch20 = (proch20)cmb_ProcH2O.SelectedValue; nuevo.ProcH2O = seelctedProch20.ProcH201; nuevo.TB = txt_Tipo.Text; nuevo.TMPB = byte.Parse(txt_Temp.Text); nuevo.TIMEB = txt_Tiempo.Text; nuevo.PB = txt_PB.Text; nuevo.Coatting = txt_Coatting.Text; nuevo.SHN = txt_SHN.Text; nuevo.STOP = txt_STOP.Text; nuevo.Substrato = txt_SUBST.Text; nuevo.TSubstrato = float.Parse(txt_TiempoSubs.Text); nuevo.Conjugado = txt_Conjug.Text; nuevo.FB = date_Fecha.Value; nuevo.fechafijIGM = date_Fijacion.Value; nuevo.ControlPos = txt_ControlPos.Text; nuevo.ControlNeg = txt_ControlNeg.Text; nuevo.ControlNegLI = float.Parse(txt_ControlNegLI.Text); nuevo.ControlNegLS = float.Parse(txt_ControlNegLS.Text); nuevo.ControlNegRadLI = float.Parse(txt_ControlNegRadioLI.Text); nuevo.ControlRadPos = txt_ControlPosRadio.Text; nuevo.ControlPosRadLI = float.Parse(txt_ControlPosRadioLI.Text); nuevo.ControlPosRadLS = float.Parse(txt_ControlPosRadioLS.Text); nuevo.ControlRadNeg = txt_ControlNegRadio.Text; nuevo.ControlNegRadLS = float.Parse(txt_ControlNegRadioLS.Text); nuevo.ControlNegRadLI = float.Parse(txt_ControlNegRadioLI.Text); nuevo.Factor = float.Parse(txt_FactorP.Text); nuevo.Factor2 = float.Parse(txt_FactorS.Text); DatosProtocoloIgMZika.updateprotocoloIgMZika(nuevo); if (allchecked) { Principal.invalid = false; } else { Principal.invalid = true; } } catch (FormatException fex) { MessageBox.Show("Error en el formato de texto", "Error detectado"); Log.logError("Error capturado: Trace: " + fex.StackTrace); } }