private void ActualizarOrden() { try { TBL_CABECERAORDENVIATICO orden = new TBL_CABECERAORDENVIATICO(); orden.ID_ORDEN = Convert.ToInt32(txtIdOrdenAct.Text.Trim()); orden.ID_SOLICITUD = txtIdSolicitudAct.Text.Trim(); if (ddlEstadosActualizar.SelectedValue == "Activo") { orden.ESTADOORDEN = 10; } else { orden.ESTADOORDEN = 9; } orden.FECHAORDEN = Convert.ToDateTime(txtFechaAct.Text.Trim()); ActualizarOrdenViatico(orden); CargarGVActualizar(); } catch (Exception ex) { throw ex; } }
public static int ActualizarOrdenViatico(TBL_CABECERAORDENVIATICO orden) { WCFServicio.Service1Client servicio = null; try { servicio = new WCFServicio.Service1Client(); return(servicio.ActualizarOrdenViaticos(orden)); } finally { if (servicio != null) { servicio.Close(); } } }
public static int GenerarOrdenViaticos(TBL_CABECERAORDENVIATICO orden, TBL_SOLICITUDVIATICOS solicitud) { WCFServicio.Service1Client servicio = null; try { servicio = new WCFServicio.Service1Client(); return(servicio.GenerarOrdenViaticos(orden, solicitud)); } finally { if (servicio != null) { servicio.Close(); } } }
public static List <TBL_CABECERAORDENVIATICO> ObtenerOrdenes() { List <TBL_CABECERAORDENVIATICO> lista = new List <TBL_CABECERAORDENVIATICO>(); try { contexto = new EmpresaPK2Entities(); var consulta = contexto.SP_OBTENER_ORDENES().ToList(); if (consulta != null) { foreach (var item in consulta) { TBL_CABECERAORDENVIATICO ov = new TBL_CABECERAORDENVIATICO(); TBL_SOLICITUDVIATICOS sv = new TBL_SOLICITUDVIATICOS(); ov.FECHAORDEN = item.FECHAORDEN; ov.ID_ORDEN = item.ID_ORDEN; ov.ID_SOLICITUD = item.ID_SOLICITUD; ov.ESTADOORDEN = item.ESTADOORDEN; lista.Add(ov); } } } catch (Exception ex) { throw ex; } finally { if (contexto != null) { contexto.Dispose(); } } return(lista); }
public static int ActualizarOrdenViaticos(TBL_CABECERAORDENVIATICO orden) { try { contexto = new EmpresaPK2Entities(); contexto.SP_ACTUALIZAR_ORDEN_VIATICO(orden.ID_ORDEN, orden.ID_SOLICITUD, orden.ESTADOORDEN, orden.FECHAORDEN); } catch (Exception ex) { throw ex; } finally { if (contexto != null) { contexto.Dispose(); } } return(1); }
public static int GenerarOrdenViaticos(TBL_CABECERAORDENVIATICO orden, TBL_SOLICITUDVIATICOS solicitud) { try { contexto = new EmpresaPK2Entities(); contexto.SP_GENERAR_ORDEN_VIATICOS(orden.ID_SOLICITUD, solicitud.NOMBREUSUARIO, solicitud.ESTADOSOLICITUD, orden.FECHAORDEN, orden.ESTADOORDEN); } catch (Exception ex) { throw ex; } finally { if (contexto != null) { contexto.Dispose(); } contexto = null; } return(1); }
public static int ActualizarOrdenViaticos(TBL_CABECERAORDENVIATICO orden) { return(AD.ADOrdenViaticos.ActualizarOrdenViaticos(orden)); }
public static int GenerarOrdenViaticos(TBL_CABECERAORDENVIATICO orden, TBL_SOLICITUDVIATICOS solicitud) { return(AD.ADOrdenViaticos.GenerarOrdenViaticos(orden, solicitud)); }