public string RegistrarCinta(DatosGenerales.TiposRespaldoCintas Tipo, int Obj_Id, string RC_Cinta, string RC_Observaciones, DateTime RC_FechaRespaldo) { string MsjBD = ""; DataSet MensajeBD = new DataSet(); Database db = EnterpriseLibraryContainer.Current.GetInstance<Database>("Inventario"); StringBuilder sqlCommand = new StringBuilder(); DbCommand selectCommand = null; try { selectCommand = db.GetSqlStringCommand("sptI_RegistrarCinta"); selectCommand.CommandType = CommandType.StoredProcedure; db.AddInParameter(selectCommand, "@TR_Id", DbType.Int32, (int)Tipo); db.AddInParameter(selectCommand, "@Obj_Id", DbType.Int32, Obj_Id); db.AddInParameter(selectCommand, "@RC_Cinta", DbType.String, RC_Cinta); db.AddInParameter(selectCommand, "@RC_Observaciones", DbType.String, RC_Observaciones); db.AddInParameter(selectCommand, "@RC_FechaRespaldo", DbType.DateTime, RC_FechaRespaldo); MensajeBD = db.ExecuteDataSet(selectCommand); } catch (Exception ex) { MsjBD = ex.Message; } return MsjBD; }
public string RegistrarCinta(DatosGenerales.TiposRespaldoCintas Tipo, int Obj_Id, string RC_Cinta, string RC_Observaciones, DateTime RC_FechaRespaldo) { DLServidores odlServidores = new DLServidores(); return(odlServidores.RegistrarCinta(Tipo, Obj_Id, RC_Cinta, RC_Observaciones, RC_FechaRespaldo)); }