Exemplo n.º 1
0
Arquivo: User.cs Projeto: 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 = "";
        }
Exemplo n.º 2
0
 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" });
 }
Exemplo n.º 3
0
 private void btnUpdate_Click(object sender, System.EventArgs e)
 {
     org.swyn.foundation.utils.DBtools db = new DBtools(tdb.User.Uhelper, tdb.User.Udbcon);
     db.UpdDS(this.objProfileDS, "tdbadmin.tdb_insprof",
         new string[] { "MPID", "MPUSER", "BCHST", "SECLEVEL", "S_ID", "LAND_ID", "DLTT_ID", "DLT_ID", "KAT_ID", "DLAT_ID", "DLNT_ID", "SAI_ID", "PRG_ID", "A_ZEIT", "E_ZEIT", "P_RANGE" },
         "tdbadmin.tdb_updprof",
         new string[] { "MPID", "MPUSER", "BCHST", "SECLEVEL", "S_ID", "LAND_ID", "DLTT_ID", "DLT_ID", "KAT_ID", "DLAT_ID", "DLNT_ID", "SAI_ID", "PRG_ID", "A_ZEIT", "E_ZEIT", "P_RANGE" },
         "tdbadmin.tdb_delprof",
         new string[] {"MPID"}, "mp_profil");
     //			IDbCommand inscmd = tdb.User.Uhelper.CreateCommand(dbc, "tdbadmin.tdb_insprof",
     //				"MPID", "MPUSER", "BCHST", "SECLEVEL", "S_ID", "LAND_ID", "DLTT_ID", "DLT_ID", "KAT_ID", "DLAT_ID", "DLNT_ID", "SAI_ID", "PRG_ID", "A_ZEIT", "E_ZEIT", "P_RANGE");
     //			IDbCommand updcmd = tdb.User.Uhelper.CreateCommand(dbc, "tdbadmin.tdb_updprof",
     //				"MPID", "MPUSER", "BCHST", "SECLEVEL", "S_ID", "LAND_ID", "DLTT_ID", "DLT_ID", "KAT_ID", "DLAT_ID", "DLNT_ID", "SAI_ID", "PRG_ID", "A_ZEIT", "E_ZEIT", "P_RANGE");
     //			IDbCommand delcmd = tdb.User.Uhelper.CreateCommand(dbc, "tdbadmin.tdb_delprof", "MPID");
     //			tdb.User.Uhelper.UpdateDataset(inscmd, delcmd, updcmd, this.objProfileDS, "mp_profil");
 }