public int CargarData(DTO.clsCargaDatos ParametrosIngreso, out DTO.clsResultado resultado) { string strConexion = ConfigurationManager.ConnectionStrings["BDD_ANDALUCIA"].ConnectionString; resultado = new DTO.clsResultado(); try { using (AseConnection con = new AseConnection(strConexion)) { con.Open(); using (AseCommand cmd = new AseCommand("anda_reporte..sp_cc_carga_datos_diario", con)) { cmd.CommandType = CommandType.StoredProcedure; if (ParametrosIngreso.Finmes != null) { cmd.Parameters.Add(new AseParameter("@i_fin_mes", AseDbType.Char, ParametrosIngreso.Finmes.Length, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Default, ParametrosIngreso.Finmes)); } if (ParametrosIngreso.Fechadesde != null) { cmd.Parameters.Add(new AseParameter("@i_fecha_desde", AseDbType.DateTime, -1, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Default, ParametrosIngreso.Fechadesde)); } if (ParametrosIngreso.FechaHasta != null) { cmd.Parameters.Add(new AseParameter("@i_fecha_hasta", AseDbType.DateTime, -1, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Default, ParametrosIngreso.FechaHasta)); } cmd.Parameters.Add(new AseParameter("@O_RETVAL", AseDbType.Integer, 0, ParameterDirection.Output, false, 0, 0, "", DataRowVersion.Default, 0)); cmd.Parameters.Add(new AseParameter("@O_RETMSG", AseDbType.NVarChar, 128, ParameterDirection.Output, false, 0, 0, "", DataRowVersion.Default, "")); cmd.ExecuteNonQuery(); resultado.Resultado = Convert.ToInt32(cmd.Parameters["@O_RETVAL"].Value); resultado.Mensaje = cmd.Parameters["@O_RETMSG"].Value.ToString(); } con.Close(); } } catch (Exception error) { string strSource = ConfigurationManager.AppSettings["NombreLog"]; using (EventLog eventLog = new System.Diagnostics.EventLog("Application", Environment.MachineName, strSource)) { eventLog.WriteEntry("Error en DAL CuentaEliminar... " + " Descripción= " + error.Message + " Stack: " + error.StackTrace, EventLogEntryType.Error, 0); } resultado.Resultado = -10; resultado.Mensaje = error.Message; } return(resultado.Resultado); }
public int CargarData2105PF(DTO.clsCargaDatos CargaDatos, out DTO.clsResultado resultado) { BLL.bllCargaDatos bll = new BLL.bllCargaDatos(); return(bll.CargarData2105PF(CargaDatos, out resultado)); }
public int CargarData(DTO.clsCargaDatos CargaDato, out DTO.clsResultado resultado) { DAL.dalCargarData dal = new DAL.dalCargarData(); return(dal.CargarData(CargaDato, out resultado)); }