//-------------------------------------------------------------------------------------------- //Get Detalle AdmSolAtencion by cPerJuridica y nSolAdmNumero //-------------------------------------------------------------------------------------------- public DataTable Get_Det_AdmSolAtencion_by_cPerJuridica_nSolAdmNumero(BE_ReqSolAtencion Request) { DataTable dt = new DataTable(); try { clsConection Obj = new clsConection(); string Cadena = Obj.GetConexionString("Naylamp"); long CerrarConexion = Obj.CerrarConexion(); using (SqlConnection cn = new SqlConnection(Cadena)) { cn.Open(); using (SqlCommand cm = new SqlCommand()) { cm.CommandText = "[usp_Get_Det_AdmSolAtencion_by_cPerJuridica_nSolAdmNumero]"; cm.CommandType = CommandType.StoredProcedure; cm.Parameters.AddWithValue("cPerJuridica", Request.cPerJuridica); cm.Parameters.AddWithValue("nSolAdmNumero", Request.nSolAdmNumero); cm.Connection = cn; using (SqlDataReader dr = cm.ExecuteReader()) dt.Load(dr); } } } catch (Exception Ex) { //throw; throw new Exception(Ex.Message, Ex); } return(dt); }
//-------------------------------------------------------------------------------------------- //Get Detalle AdmSolAtencion by cPerJuridica y nSolAdmNumero //-------------------------------------------------------------------------------------------- public DataTable Get_Det_AdmSolAtencion_by_cPerJuridica_nSolAdmNumero(BE_ReqSolAtencion Request) { DataTable dt = new DataTable(); try { clsConection Obj = new clsConection(); string Cadena = Obj.GetConexionString("Naylamp"); long CerrarConexion = Obj.CerrarConexion(); using (SqlConnection cn = new SqlConnection(Cadena)) { cn.Open(); using (SqlCommand cm = new SqlCommand()) { cm.CommandText = "[usp_Get_Det_AdmSolAtencion_by_cPerJuridica_nSolAdmNumero]"; cm.CommandType = CommandType.StoredProcedure; cm.Parameters.AddWithValue("cPerJuridica", Request.cPerJuridica); cm.Parameters.AddWithValue("nSolAdmNumero", Request.nSolAdmNumero); cm.Connection = cn; using (SqlDataReader dr = cm.ExecuteReader()) dt.Load(dr); } } } catch (Exception Ex) { //throw; throw new Exception(Ex.Message, Ex); } return dt; }