private void btnLoad_Click(object sender, System.EventArgs e)
        {
            string sql;

            org.swyn.foundation.utils.DBtools db = new DBtools(tdb.User.Uhelper, tdb.User.Udbcon);
            this.objProfileDS.Clear();
            sql = String.Format("Select * from tdbadmin.mp_profil");
            db.FillDs(this.objProfileDS, sql, new string[] { "mp_profil" });
        }
Esempio n. 2
0
        public void LoadProfile(string Auser)
        {
            dbt = new DBtools(tdb.User.Uhelper, tdb.User.Udbcon);
            tdb.Season   sai  = new tdb.Season();
            tdb.Language lang = new tdb.Language();
            tdb.Customer pers = new tdb.Customer();
            ProfileDS    prof;
            string       sql;

            // load profile from DB by user name
            prof = new ProfileDS();
            sql  = String.Format("Select * from tdbadmin.mp_profil where mpuser like '{0}'", Auser);
            dbt.FillDs(prof, sql, new string[] { "mp_profil" });
            ProfileDS.mp_profilRow Rprof = prof.mp_profil[0];

            // set now the user profile data
            // Console.WriteLine("Prof Id {0}", Rprof.MPID);
            Useclevel = Rprof.SECLEVEL;
            Ulangid   = Rprof.S_ID;
            if (Ulangid > 0)
            {
                Ulang = lang.GetBez(Ulangid);
            }
            else
            {
                Ulang = "";
            }
            Uofficeid = Rprof.BCHST;
            if (Uofficeid > 0)
            {
                Uoffice = pers.GetBez(Uofficeid);
            }
            else
            {
                Ulang = "";
            }
            Udlatid = Rprof.DLAT_ID;
            Usaiid  = Rprof.SAI_ID;
            if (Usaiid > 0)
            {
                Usai = sai.GetBez(Usaiid);
            }
            else
            {
                Usai = "";
            }
        }