public dynamic LayDS_Thulao_Fiber_Theo_Thang_D2([FromBody] monthFromTo month) { DataRespond data = new DataRespond(); try { data.success = true; data.data = _FiberThulao.LayDS_Thulao_Fiber_Theo_Thang_D2(month); } catch (Exception e) { data.success = false; data.message = e.Message; data.error = e; } return(data); }
public dynamic LayDS_Thulao_Fiber_Theo_Thang_D2(monthFromTo month) { List <FiberThulao> result = new List <FiberThulao>(); var dyParam = new OracleDynamicParameters(); dyParam.Add("tu_thang", OracleDbType.Varchar2, ParameterDirection.Input, month.monthFrom); dyParam.Add("den_thang", OracleDbType.Varchar2, ParameterDirection.Input, month.monthTo); dyParam.Add("o_data", OracleDbType.RefCursor, ParameterDirection.Output); var conn = Connection.GetConnectionOracle(); if (conn.State == ConnectionState.Closed) { conn.Open(); } if (conn.State == ConnectionState.Open) {//TK_PTM_Fiber var query = "PK_FIBER.LayDS_Thulao_Fiber_Theo_Thang_D2"; result = SqlMapper.Query <FiberThulao>(conn, query, param: dyParam, commandType: CommandType.StoredProcedure).AsList <FiberThulao>(); conn.Close(); } return(result); }