Пример #1
0
        public int Update_Datos_Generales(Spartane.Core.Classes.Presentacion.Presentacion entity)
        {
            int rta;

            try
            {
                Spartane.Core.Classes.Presentacion.Presentacion PresentacionDB = GetByKey(entity.Clave, false);
                var paramUpdClave = _dataProvider.GetParameter();
                paramUpdClave.ParameterName = "Clave";
                paramUpdClave.DbType        = DbType.Int32;
                paramUpdClave.Value         = (object)entity.Clave ?? DBNull.Value;
                var paramUpdDescripcion = _dataProvider.GetParameter();
                paramUpdDescripcion.ParameterName = "Descripcion";
                paramUpdDescripcion.DbType        = DbType.String;
                paramUpdDescripcion.Value         = (object)entity.Descripcion ?? DBNull.Value;


                var empEntity =
                    _dbContext.ExecuteStoredProcedureList <Spartane.Core.Classes.StoredProcedure.sp_UpdPresentacion>("sp_UpdPresentacion", paramUpdClave, paramUpdDescripcion).FirstOrDefault();

                rta = Convert.ToInt32(empEntity.Clave);
            }
            catch (ExceptionBase ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new ServiceException(ex.Message, ex);
            }

            return(rta);
        }
Пример #2
0
        public static bool EjecutarValidacionesBeforeDelete(Spartane.Core.Classes.Presentacion.Presentacion obj)
        {
            bool ret = true;

            //NEWBUSINESSRULE_BEFOREDELETE//
            return(ret);
        }
Пример #3
0
        public static string ReplaceQuery(string query, Spartane.Core.Classes.Presentacion.Presentacion 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);
        }
Пример #4
0
 public static void EjecutarValidacionesAfterListSelAll(Spartane.Core.Classes.Presentacion.Presentacion obj)
 {
     //NEWBUSINESSRULE_AFTERLISTSELALL//
 }
Пример #5
0
 public static void EjecutarValidacionesAfterGet(Spartane.Core.Classes.Presentacion.Presentacion obj)
 {
     //NEWBUSINESSRULE_AFTERGET//
 }
Пример #6
0
 public static void EjecutarValidacionesAfterDelete(Spartane.Core.Classes.Presentacion.Presentacion obj)
 {
     //NEWBUSINESSRULE_AFTERDELETE//
 }