public string Nombreemp(string ced) { using (var ctx = new ERP_HistoriasClinicas.ERP_HistoriasClinicasEntities()) { var d = ctx.PERSONA.Find(ced); ERP_HistoriasClinicas.Persona2 r = null; if (d != null) { r = new ERP_HistoriasClinicas.Persona2 { CEDULA_EMP = d.CEDULA_EMP, CIUDADNACI_EMP = d.CIUDADNACI_EMP, DIRECCIO_EMP = d.DIRECCIO_EMP, EMAIL_EMP = d.EMAIL_EMP, ESTADO_EMP = d.ESTADO_EMP, NACIFECHA_EMP = d.NACIFECHA_EMP, NACIONALIDAD_EMP = d.NACIONALIDAD_EMP, NOMBRES_EMP = d.NOMBRES_EMP, TELEFONO_EMP = d.TELEFONO_EMP, TIPO_EMP = d.TIPO_EMP }; } return(r.NOMBRES_EMP); } }
public ERP_HistoriasClinicas.Empleado2 login(string uname, string pwd) { using (var ctx = new ERP_HistoriasClinicas.ERP_HistoriasClinicasEntities()) { var d = ctx.EMPLEADO.Find(uname); ERP_HistoriasClinicas.Empleado2 r = null; if (d != null) { r = new ERP_HistoriasClinicas.Empleado2 { ID_AREA = d.ID_AREA, CEDULA_EMP = d.CEDULA_EMP, CARGO_US = d.CARGO_US, PASWORD_US = d.PASWORD_US, ACTIVO_EMP = d.ACTIVO_EMP, PAIS = d.PAIS }; } if (r.ACTIVO_EMP == "ACTIVO") { return(r); } else { return(null); } } }