예제 #1
0
        public override void Fill(DomainObject obj, IDataReader dr)
        {
            EACCION objACCION = obj as EACCION;

            //Poner las rutinas del Tools que se necesiten

            objACCION.CODACCION = Utiles.ConvertToInt16(dr["COD_ACCION"]);

            objACCION.NOMBREACCION = Utiles.ConvertToString(dr["NOMBRE_ACCION"]);
        }
예제 #2
0
        protected override IDbDataParameter[] GetDeleteParameters(DomainObject obj, DB db)
        {
            IDbDataParameter[] prms      = db.GetArrayParameter(1);
            EACCION            objACCION = obj as EACCION;

            prms[0]               = db.GetParameter();
            prms[0].Value         = objACCION.CODACCION;
            prms[0].ParameterName = "@COD_ACCION";

            return(prms);
        }
예제 #3
0
 public bool Update(EACCION objACCION)
 {
     try
     {
         _objDAL.Update(objACCION);
         return(true);
     }
     catch (Exception ex)
     {
         Log log = new Log();
         log.EscribirLog(ex);
         return(false);
     }
 }
예제 #4
0
 public bool Save(EACCION objACCION)
 {
     try
     {
         objACCION.Save();
         return(true);
     }
     catch (Exception ex)
     {
         Log log = new Log();
         log.EscribirLog(ex);
         return(false);
     }
 }
예제 #5
0
        protected override IDbDataParameter[] GetUpdateParameters(DomainObject obj, DB db)
        {
            IDbDataParameter[] prms      = db.GetArrayParameter(2);
            EACCION            objACCION = obj as EACCION;

            //Poner las rutinas del Tools que se necesiten

            prms[0]               = db.GetParameter();
            prms[0].Value         = objACCION.CODACCION;
            prms[0].ParameterName = "@COD_ACCION";

            prms[1]               = db.GetParameter();
            prms[1].Value         = objACCION.NOMBREACCION;
            prms[1].ParameterName = "@NOMBRE_ACCION";

            return(prms);
        }
예제 #6
0
        protected override void SetPrimaryKey(DomainObject obj, long id)
        {
            EACCION objRoot = obj as EACCION;

            objRoot.CODACCION = Utiles.ConvertToInt16(id);
        }