Esempio n. 1
0
        public bool AddSP(SSF_EVALUACIONTIPO evaluaciont)
        {
            String sglosa = string.Empty;
            var    param1 = new OracleParameter("p_tipo", OracleDbType.Varchar2, 100, obj: evaluaciont.TIPO, direction: ParameterDirection.Input);
            var    param2 = new OracleParameter("p_descripcion", OracleDbType.Varchar2, 150, obj: evaluaciont.DESCRIPCION, direction: ParameterDirection.Input);
            var    param3 = new OracleParameter("o_glosa", OracleDbType.Varchar2, 100, obj: sglosa, direction: ParameterDirection.Output);
            var    param4 = new OracleParameter("o_estado", OracleDbType.Int16, ParameterDirection.Output);
            var    param5 = new OracleParameter("o_id", OracleDbType.Decimal, ParameterDirection.Output);

            CommonBC.ModeloSafe.Database.ExecuteSqlCommand(
                "BEGIN pkg_ssfEvaluaciontipo.sp_add(:p_tipo, :p_descripcion, :o_glosa, :o_estado, :o_id); end;",
                param1, param2, param3, param4, param5);
            System.Diagnostics.Debug.WriteLine("o_glosa: {0}", param3.Value);
            System.Diagnostics.Debug.WriteLine("o_estado: {0}", param4.Value);
            System.Diagnostics.Debug.WriteLine("o_id: {0}", param5.Value);

            if (param3.Value.ToString().ToLower().Contains("xito"))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 2
0
        public SSF_EVALUACIONTIPO Find(int id)
        {
            SSF_EVALUACIONTIPO evaluaciont = null;

            evaluaciont = CommonBC.ModeloSafe.SSF_EVALUACIONTIPO.Find(id);
            return(evaluaciont);
        }
Esempio n. 3
0
 public bool Add(SSF_EVALUACIONTIPO evaluaciont)
 {
     try
     {
         CommonBC.ModeloSafe.SSF_EVALUACIONTIPO.Add(evaluaciont);
         CommonBC.ModeloSafe.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         System.Diagnostics.Debug.WriteLine("Error: {0}", ex.Message);
         return(false);
     }
 }
Esempio n. 4
0
 public bool Remove(int id)
 {
     try
     {
         SSF_EVALUACIONTIPO evaluaciont = CommonBC.ModeloSafe.SSF_EVALUACIONTIPO.Find(id);
         CommonBC.ModeloSafe.SSF_EVALUACIONTIPO.Remove(evaluaciont);
         CommonBC.ModeloSafe.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         System.Diagnostics.Debug.WriteLine("Error Remove: {0}", ex.Message);
         return(false);
     }
 }
Esempio n. 5
0
 public bool Update(SSF_EVALUACIONTIPO evaluaciont)
 {
     try
     {
         SSF_EVALUACIONTIPO evaluaciontUpdate = null;
         evaluaciontUpdate             = CommonBC.ModeloSafe.SSF_EVALUACIONTIPO.Find(evaluaciont.ID);
         evaluaciontUpdate.TIPO        = evaluaciont.TIPO;
         evaluaciontUpdate.DESCRIPCION = evaluaciont.DESCRIPCION;
         CommonBC.ModeloSafe.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }