Example #1
0
        public bool Actualizar(BE_SUN_CATEMPRESA entCatEmpresa)
        {
            bool       booOk      = false;
            DatosMySql xMiFuncion = new DatosMySql();

            if (xMiFuncion.StoreEjecutar("sun_catempresa_actualizar", entCatEmpresa, mysConec, null) == true)
            {
                booOk = true;
            }
            else
            {
                booOcurrioError = xMiFuncion.booOcurrioError;
                StrErrorMensaje = xMiFuncion.StrErrorMensaje;
                IntErrorNumber  = xMiFuncion.IntErrorNumber;
            }

            return(booOk);
        }
Example #2
0
        public BE_SUN_CATEMPRESA TraerRegistro(int n_IdRegistro)
        {
            BE_SUN_CATEMPRESA Ent_CatEmpresa = new BE_SUN_CATEMPRESA();
            DatosMySql        xMiFuncion     = new DatosMySql();

            DataTable DtResultado = new DataTable();

            string[,] arrParametros = new string[1, 3] {
                { "n_id", "System.INT16", n_IdRegistro.ToString() }
            };
            DtResultado = xMiFuncion.StoreDTLLenar("sun_catempresa_obtenerregistro", arrParametros, mysConec);

            if (DtResultado.Rows.Count != 0)
            {
                Ent_CatEmpresa.n_id     = Convert.ToInt32(DtResultado.Rows[0]["n_id"].ToString());
                Ent_CatEmpresa.c_codsun = DtResultado.Rows[0]["c_codsun"].ToString();
                Ent_CatEmpresa.c_des    = DtResultado.Rows[0]["c_des"].ToString();
            }
            return(Ent_CatEmpresa);
        }
Example #3
0
        public bool Actualizar(BE_SUN_CATEMPRESA entCatEmpresa)
        {
            BE_SUN_CATEMPRESA entNuevoCatEmpresa = new BE_SUN_CATEMPRESA();
            CD_sun_catempresa miFun = new CD_sun_catempresa();
            bool booOk = false;

            miFun.mysConec = mysConec;

            entNuevoCatEmpresa.n_id     = entCatEmpresa.n_id;
            entNuevoCatEmpresa.c_codsun = entCatEmpresa.c_codsun;
            entNuevoCatEmpresa.c_des    = entCatEmpresa.c_des;

            booOk = miFun.Actualizar(entNuevoCatEmpresa);

            booOcurrioError = miFun.booOcurrioError;
            StrErrorMensaje = miFun.StrErrorMensaje;
            IntErrorNumber  = miFun.IntErrorNumber;

            return(booOk);
        }