Ejemplo n.º 1
0
 private static void Test_GetUserForPSId()
 {
     UserList ul = new UserList(@"C:\Docs\Pers\PSInterface\PSITest\bin\Debug\");
     if (ul.Load() < 0)
         Console.WriteLine("error");
     else
         Console.WriteLine("ok");
     if (ul.GetUserIxForPSId("3333") >= 0)
         Console.WriteLine("Found 3333 ");
     if (ul.GetUserIxForPSId("99") < 0)
         Console.WriteLine("Not Found 99");
 }
Ejemplo n.º 2
0
 private bool CheckUserId(string psuser)
 {
     bool rc = false;
     cuser = null; cuser_ix = -1;
     ul = new UserList(Server.MapPath("~/App_Data/"));
     if (ul.Load() == 0)
     {
         int uix = ul.GetUserIxForPSId(psuser);
         if (uix >= 0)
         {
             rc = true;
             cuser = ul.USrs[uix];
             cuser_ix = uix;
         }
     }
     else
         litMsg.Text = "Error loading Users";
     return rc;
 }