public static bool EjecutarValidacionesBeforeDelete(Spartane.Core.Classes.Detalle_de_Ingredientes.Detalle_de_Ingredientes obj) { bool ret = true; //NEWBUSINESSRULE_BEFOREDELETE// return(ret); }
public int Update(Spartane.Core.Classes.Detalle_de_Ingredientes.Detalle_de_Ingredientes entity) { int rta; try { var paramUpdClave = _dataProvider.GetParameter(); paramUpdClave.ParameterName = "Clave"; paramUpdClave.DbType = DbType.Int32; paramUpdClave.Value = (object)entity.Clave ?? DBNull.Value; var paramUpdCantidad = _dataProvider.GetParameter(); paramUpdCantidad.ParameterName = "Cantidad"; paramUpdCantidad.DbType = DbType.String; paramUpdCantidad.Value = (object)entity.Cantidad ?? DBNull.Value; var paramUpdUnidad = _dataProvider.GetParameter(); paramUpdUnidad.ParameterName = "Unidad"; paramUpdUnidad.DbType = DbType.Int32; paramUpdUnidad.Value = (object)entity.Unidad ?? DBNull.Value; var paramUpdNombre_del_Ingrediente = _dataProvider.GetParameter(); paramUpdNombre_del_Ingrediente.ParameterName = "Nombre_del_Ingrediente"; paramUpdNombre_del_Ingrediente.DbType = DbType.Int32; paramUpdNombre_del_Ingrediente.Value = (object)entity.Nombre_del_Ingrediente ?? DBNull.Value; var paramUpdNombre_de_presentacion = _dataProvider.GetParameter(); paramUpdNombre_de_presentacion.ParameterName = "Nombre_de_presentacion"; paramUpdNombre_de_presentacion.DbType = DbType.Int32; paramUpdNombre_de_presentacion.Value = (object)entity.Nombre_de_presentacion ?? DBNull.Value; var paramUpdNombre_de_Marca = _dataProvider.GetParameter(); paramUpdNombre_de_Marca.ParameterName = "Nombre_de_Marca"; paramUpdNombre_de_Marca.DbType = DbType.Int32; paramUpdNombre_de_Marca.Value = (object)entity.Nombre_de_Marca ?? DBNull.Value; var paramUpdPlatillos = _dataProvider.GetParameter(); paramUpdPlatillos.ParameterName = "Platillos"; paramUpdPlatillos.DbType = DbType.Int32; paramUpdPlatillos.Value = (object)entity.Platillos ?? DBNull.Value; var empEntity = _dbContext.ExecuteStoredProcedureList <Spartane.Core.Classes.StoredProcedure.sp_UpdDetalle_de_Ingredientes>("sp_UpdDetalle_de_Ingredientes", paramUpdClave, paramUpdCantidad, paramUpdUnidad, paramUpdNombre_del_Ingrediente, paramUpdNombre_de_presentacion, paramUpdNombre_de_Marca, paramUpdPlatillos).FirstOrDefault(); rta = Convert.ToInt32(empEntity.Clave); } catch (ExceptionBase ex) { throw ex; } catch (Exception ex) { throw new ServiceException(ex.Message, ex); } return(rta); }
public static string ReplaceQuery(string query, Spartane.Core.Classes.Detalle_de_Ingredientes.Detalle_de_Ingredientes 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 static void EjecutarValidacionesAfterListSelAll(Spartane.Core.Classes.Detalle_de_Ingredientes.Detalle_de_Ingredientes obj) { //NEWBUSINESSRULE_AFTERLISTSELALL// }
public static void EjecutarValidacionesAfterGet(Spartane.Core.Classes.Detalle_de_Ingredientes.Detalle_de_Ingredientes obj) { //NEWBUSINESSRULE_AFTERGET// }