public static bool EjecutarValidacionesBeforeDelete(Spartane.Core.Classes.Pais.Pais obj) { bool ret = true; //NEWBUSINESSRULE_BEFOREDELETE// return(ret); }
public static string ReplaceQuery(string query, Spartane.Core.Classes.Pais.Pais obj) { //codigo para que reemplace los FLD Regex regex = new Regex(@"FLD\[([^\]]+)\]"); MatchCollection matches = regex.Matches(query); string auxMatch = ""; foreach (Match match in matches) { foreach (Capture capture in match.Captures) { auxMatch = capture.Value.Replace("FLD[", "").Replace("]", ""); PropertyInfo info = obj.GetType().GetProperty(auxMatch); query = GeneralHelper.ReplaceFLD(query, auxMatch, obj, info, capture.Value); } } return(query); }
public int Insert(Spartane.Core.Classes.Pais.Pais entity) { int rta; try { var padreClave = _dataProvider.GetParameter(); padreClave.ParameterName = "Clave"; padreClave.DbType = DbType.Int32; padreClave.Value = (object)entity.Clave ?? DBNull.Value; var padreNombre_del_Pais = _dataProvider.GetParameter(); padreNombre_del_Pais.ParameterName = "Nombre_del_Pais"; padreNombre_del_Pais.DbType = DbType.String; padreNombre_del_Pais.Value = (object)entity.Nombre_del_Pais ?? DBNull.Value; var padreAbreviatura = _dataProvider.GetParameter(); padreAbreviatura.ParameterName = "Abreviatura"; padreAbreviatura.DbType = DbType.String; padreAbreviatura.Value = (object)entity.Abreviatura ?? DBNull.Value; var padreCodigo = _dataProvider.GetParameter(); padreCodigo.ParameterName = "Codigo"; padreCodigo.DbType = DbType.String; padreCodigo.Value = (object)entity.Codigo ?? DBNull.Value; var empEntity = _dbContext.ExecuteStoredProcedureList <Spartane.Core.Classes.StoredProcedure.sp_InsPais>("sp_InsPais", padreNombre_del_Pais , padreAbreviatura , padreCodigo ).FirstOrDefault(); rta = Convert.ToInt32(empEntity.Clave); } catch (ExceptionBase ex) { throw ex; } catch (Exception ex) { throw new ServiceException(ex.Message, ex); } return(rta); }
public static void EjecutarValidacionesAfterListSelAll(Spartane.Core.Classes.Pais.Pais obj) { //NEWBUSINESSRULE_AFTERLISTSELALL// }
public static void EjecutarValidacionesAfterGet(Spartane.Core.Classes.Pais.Pais obj) { //NEWBUSINESSRULE_AFTERGET// }
public static void EjecutarValidacionesAfterDelete(Spartane.Core.Classes.Pais.Pais obj) { //NEWBUSINESSRULE_AFTERDELETE// }