Ejemplo n.º 1
0
        public static bool EjecutarValidacionesBeforeDelete(Spartane.Core.Classes.Detalle_Antecedentes_Familiares.Detalle_Antecedentes_Familiares obj)
        {
            bool ret = true;

            //NEWBUSINESSRULE_BEFOREDELETE//
            return(ret);
        }
        public int Insert(Spartane.Core.Classes.Detalle_Antecedentes_Familiares.Detalle_Antecedentes_Familiares entity)
        {
            int rta;

            try
            {
                var padreFolio = _dataProvider.GetParameter();
                padreFolio.ParameterName = "Folio";
                padreFolio.DbType        = DbType.Int32;
                padreFolio.Value         = (object)entity.Folio ?? DBNull.Value;
                var padreFolio_Pacientes = _dataProvider.GetParameter();
                padreFolio_Pacientes.ParameterName = "Folio_Pacientes";
                padreFolio_Pacientes.DbType        = DbType.Int32;
                padreFolio_Pacientes.Value         = (object)entity.Folio_Pacientes ?? DBNull.Value;
                var padreEnfermedad = _dataProvider.GetParameter();
                padreEnfermedad.ParameterName = "Enfermedad";
                padreEnfermedad.DbType        = DbType.Int32;
                padreEnfermedad.Value         = (object)entity.Enfermedad ?? DBNull.Value;

                var padreParentesco = _dataProvider.GetParameter();
                padreParentesco.ParameterName = "Parentesco";
                padreParentesco.DbType        = DbType.Int32;
                padreParentesco.Value         = (object)entity.Parentesco ?? DBNull.Value;



                var empEntity =
                    _dbContext.ExecuteStoredProcedureList <Spartane.Core.Classes.StoredProcedure.sp_InsDetalle_Antecedentes_Familiares>("sp_InsDetalle_Antecedentes_Familiares", padreFolio_Pacientes
                                                                                                                                        , padreEnfermedad
                                                                                                                                        , padreParentesco
                                                                                                                                        ).FirstOrDefault();

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

            return(rta);
        }
Ejemplo n.º 3
0
        public static string ReplaceQuery(string query, Spartane.Core.Classes.Detalle_Antecedentes_Familiares.Detalle_Antecedentes_Familiares 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);
        }
Ejemplo n.º 4
0
 public static void EjecutarValidacionesAfterListSelAll(Spartane.Core.Classes.Detalle_Antecedentes_Familiares.Detalle_Antecedentes_Familiares obj)
 {
     //NEWBUSINESSRULE_AFTERLISTSELALL//
 }
Ejemplo n.º 5
0
 public static void EjecutarValidacionesAfterGet(Spartane.Core.Classes.Detalle_Antecedentes_Familiares.Detalle_Antecedentes_Familiares obj)
 {
     //NEWBUSINESSRULE_AFTERGET//
 }