protected void BotonGuardar_click(object sender, EventArgs e) { svcSCPP.SCPPClient svc = new svcSCPP.SCPPClient(); LAMOSA.SCPP.Server.BusinessEntity.Prueba p = new LAMOSA.SCPP.Server.BusinessEntity.Prueba(); try { DropDownList cmbPlanta = ((DropDownList)Page.Master.FindControl("cmbPlanta")); int ClavePrueba = -1, iCodPlanta = -1; int.TryParse(cmbPlanta.SelectedValue, out iCodPlanta); int.TryParse(hddClavePrueba.Value, out ClavePrueba); p.ClavePrueba = ClavePrueba; p.DesPrueba = hddDesPrueba.Value; p.CodProceso = int.Parse(hddProceso.Value.ToString()); p.CodProcesoFin = int.Parse(hddProcesoFin.Value.ToString()); p.ResidenciaMax = int.Parse(hddResidenciaMax.Value.ToString()); svc.GuardarPrueba(p, iCodPlanta); cmbProceso_SelectedIndexChanged(sender, e); WebAsyncRefreshPanel1.DataBind(); } catch (Exception err) { throw err; } }
protected void BotonGuardar_click(object sender, EventArgs e) { svcSCPP.SCPPClient svc = new svcSCPP.SCPPClient(); LAMOSA.SCPP.Server.BusinessEntity.Turno t = new LAMOSA.SCPP.Server.BusinessEntity.Turno(); try { int codTutno = -1; int.TryParse(hddCodTurno.Value, out codTutno); t.CodTurno = codTutno; t.DesTurno = hddDesTurno.Value; t.HoraInicio = DateTime.Parse(hddHoraInicio.Value.ToString()); t.HoraFin = DateTime.Parse(hddHoraFin.Value.ToString()); if (hddActivo.Value.ToLower() == @"'true'") { t.Activo = true; } else { t.Activo = false; } svc.GuardarTurno(t); llenaGrid(); WebAsyncRefreshPanel1.DataBind(); } catch (Exception err) { throw err; } }
protected void BotonGuardar_click(object sender, EventArgs e) { svcSCPP.SCPPClient svc = new svcSCPP.SCPPClient(); LAMOSA.SCPP.Server.BusinessEntity.rolplanta rp = new LAMOSA.SCPP.Server.BusinessEntity.rolplanta(); try { int ClaveRol = -1; int.TryParse(hddClaveRol.Value, out ClaveRol); rp.ClaveRol = ClaveRol; rp.DescripcionRol = hddDescripcionRol.Value; int ClavePlanta = -1; int.TryParse(hddCodPlanta.Value, out ClavePlanta); rp.CodPlanta = ClavePlanta; if (hddActivo.Value.ToLower() == @"'true'") { rp.Activo = true; } else { rp.Activo = false; } svc.GuardaRol(rp); llenaGrid(); WebAsyncRefreshPanel1.DataBind(); } catch (Exception err) { throw err; } }
protected void BotonEliminar_click(object sender, EventArgs e) { svcSCPP.SCPPClient svc = new svcSCPP.SCPPClient(); LAMOSA.SCPP.Server.BusinessEntity.Turno t = new LAMOSA.SCPP.Server.BusinessEntity.Turno(); try { svc.EliminaTurno(int.Parse(hddCodTurno.Value)); llenaGrid(); WebAsyncRefreshPanel1.DataBind(); } catch (Exception err) { throw err; } }
protected void BotonEliminar_click(object sender, EventArgs e) { svcSCPP.SCPPClient svc = new svcSCPP.SCPPClient(); LAMOSA.SCPP.Server.BusinessEntity.Prueba p = new LAMOSA.SCPP.Server.BusinessEntity.Prueba(); try { svc.EliminaPrueba(int.Parse(hddClavePrueba.Value)); cmbProceso_SelectedIndexChanged(sender, e); WebAsyncRefreshPanel1.DataBind(); } catch (Exception err) { throw err; } }
protected void BotonGuardar_click(object sender, EventArgs e) { svcSCPP.SCPPClient svc = new svcSCPP.SCPPClient(); LAMOSA.SCPP.Server.BusinessEntity.Usuario u = new LAMOSA.SCPP.Server.BusinessEntity.Usuario(); try { u.NombreUsuario = hddNombreUsuario.Value; //u.Contrasena= hddContrasena.Value; u.Contrasena = "Lamosa06"; int CodEmpleado = -1; int.TryParse(hddCodEmpleado.Value, out CodEmpleado); u.CodEmpleado = CodEmpleado; int CodRol = -1; int.TryParse(hddCodRol.Value, out CodRol); u.CodRol = CodRol; int Supervisor = -1; int.TryParse(hddSupervisor.Value, out Supervisor); u.CodSupervisor = Supervisor; if (hddBloqueado.Value.ToLower() == @"'true'") { u.Bloqueado = true; } u.Email = hddCorreo.Value; int CodUsuario = -1; int.TryParse(hddCodUsuario.Value, out CodUsuario); u.CodUsuario = CodUsuario; u = svc.GuardarUsuario(u); WebAsyncRefreshPanel1.DataBind(); if (u.ExceptionMessage != null && u.ExceptionMessage.Length > 1) { throw new Exception(u.ExceptionMessage); } } catch (Exception err) { CallBackManager.AddScriptBlock(this.Page, WebAsyncRefreshPanel1, "<script type='text/javascript'>alert('" + err.Message + "');</script>"); } llenaGrid(); }
protected void BotonGuardar_click(object sender, EventArgs e) { svcSCPP.SCPPClient svc = new svcSCPP.SCPPClient(); LAMOSA.SCPP.Server.BusinessEntity.MetasProd m = new LAMOSA.SCPP.Server.BusinessEntity.MetasProd(); try { m.Planta = int.Parse(hddPlanta.Value); m.CantProc = int.Parse(hddcant_procesadas.Value); m.CantInv = int.Parse(hddcant_inventario.Value); m.CantDesp = int.Parse(hddcant_desperdicio.Value); m.CantVerde = int.Parse(hddcant_desp_verde.Value); m.CantQuemado = int.Parse(hddcant_desp_quemado.Value); m.ICalidad1 = int.Parse(hddcalidad1.Value); m.PorcCal1 = int.Parse(hddporcentaje_cal1.Value); m.ICalidad2 = int.Parse(hddcalidad2.Value); m.PorcCal2 = int.Parse(hddporcentaje_cal2.Value); m.ICalidad3 = int.Parse(hddcalidad3.Value); m.PorcCal3 = int.Parse(hddporcentaje_cal3.Value); m.ICalidad4 = int.Parse(hddcalidad4.Value); m.PorcCal4 = int.Parse(hddporcentaje_cal4.Value); m.TipoProc = int.Parse(hddtipo_procesadas.Value); m.TipoInv = int.Parse(hddtipo_inventario.Value); m.TipoDesp = int.Parse(hddtipo_desperdicio.Value); m.TipoVerde = int.Parse(hddtipo_desp_verde.Value); m.TipoQuemado = int.Parse(hddtipo_desp_quemado.Value); m.TipoCal1 = int.Parse(hddtipo_porcent_cal1.Value); m.TipoCal2 = int.Parse(hddtipo_porcent_cal2.Value); m.TipoCal3 = int.Parse(hddtipo_porcent_cal3.Value); m.TipoCal4 = int.Parse(hddtipo_porcent_cal4.Value); svc.GuardarMetasProd(m); btnLlenaGrid_Click(sender, e); WebAsyncRefreshPanel1.DataBind(); if (m.ExceptionMessage != null && m.ExceptionMessage.Length > 1) { throw new Exception(m.ExceptionMessage); } } catch (Exception err) { CallBackManager.AddScriptBlock(this.Page, WebAsyncRefreshPanel1, "<script type='text/javascript'>alert('" + err.Message + "');</script>"); } }
protected void BotonGuardar_click(object sender, EventArgs e) { svcSCPP.SCPPClient svc = new svcSCPP.SCPPClient(); LAMOSA.SCPP.Server.BusinessEntity.CondicionOperacionGuarda co = new LAMOSA.SCPP.Server.BusinessEntity.CondicionOperacionGuarda(); try { int CodCondicionOperacion = -1; int.TryParse(hddCodCondicionOperacion.Value, out CodCondicionOperacion); co.CodCondicionOperacion = CodCondicionOperacion; co.CodArea = int.Parse(hddCodArea.Value); co.Temperatura = double.Parse(hddTemperatura.Value); co.Humedad = double.Parse(hddHumedad.Value); svc.GuardarCondicionOperacion(co); btnLlenaGrid_Click(sender, e); WebAsyncRefreshPanel1.DataBind(); } catch (Exception err) { throw err; } }
protected void BotonAutorizar_click(object sender, EventArgs e) { Usuario user = (Usuario)Session["UserLogged"]; var CodUser = user.CodUsuario; svcSCPP.SCPPClient svc = new svcSCPP.SCPPClient(); LAMOSA.SCPP.Server.BusinessEntity.CondicionPastaAutoriza cp = new LAMOSA.SCPP.Server.BusinessEntity.CondicionPastaAutoriza(); try { int CodCondicionPasta = -1; int.TryParse(hddCodCondicionPasta.Value, out CodCondicionPasta); cp.CodCondicionPasta = CodCondicionPasta; cp.UsuarioAutoriza = CodUser; svc.AutorizaCondicionPasta(cp); btnLlenaGrid_Click(sender, e); WebAsyncRefreshPanel1.DataBind(); btnLlenaGrid_Click(sender, e); } catch (Exception err) { throw err; } }
protected void BotonGuardar_click(object sender, EventArgs e) { svcSCPP.SCPPClient svc = new svcSCPP.SCPPClient(); LAMOSA.SCPP.Server.BusinessEntity.Configuracion Conf = new LAMOSA.SCPP.Server.BusinessEntity.Configuracion(); try { Conf.CodConfiguracion = 1; Conf.ValorConfiguracion = int.Parse(TxtIntentos.Text); svc.GuardarConfig(Conf); Conf.CodConfiguracion = 2; Conf.ValorConfiguracion = int.Parse(TxtDiasPass.Text); svc.GuardarConfig(Conf); WebAsyncRefreshPanel1.DataBind(); LlenaCampos(); } catch (Exception err) { throw err; } }