예제 #1
0
파일: ProfileGUI.cs 프로젝트: oeli/yafra
 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" });
 }
예제 #2
0
파일: User.cs 프로젝트: oeli/yafra
        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 = "";
        }