Example #1
0
 public void SetUserItem(string userName, UserStorageSections section, object data)
 {
     try
     {
         DataTable userTable = GetUserTable(userName, section);
         if (!userTable.Columns.Contains("userdata"))
         {
             userTable.Columns.Add("userdata");
             userTable.Columns.Add("datatype");
         }
         DataRow row;
         if (userTable.Rows.Count == 0)
         {
             row = userTable.NewRow();
             userTable.Rows.Add(row);
         }
         else
         {
             row = userTable.Rows[0];
         }
         Serialize(row, data);
         SaveUserSet(userName);
     }
     catch (Exception)
     {
     }
 }
Example #2
0
 private DataTable GetUserTable(string userName, UserStorageSections section)
 {
     DataSet userSet = GetUserSet(userName);
     if (!userSet.Tables.Contains(section.ToString()))
     {
         userSet.Tables.Add(section.ToString());
     }
     return userSet.Tables[section.ToString()];
 }
Example #3
0
        private DataTable GetUserTable(string userName, UserStorageSections section)
        {
            DataSet userSet = GetUserSet(userName);

            if (!userSet.Tables.Contains(section.ToString()))
            {
                userSet.Tables.Add(section.ToString());
            }
            return(userSet.Tables[section.ToString()]);
        }
Example #4
0
 public object GetUserItem(string userName, UserStorageSections section)
 {
     try
     {
         DataTable userTable = GetUserTable(userName, section);
         if (!userTable.Columns.Contains("userdata"))
         {
             userTable.Columns.Add("userdata");
             userTable.Columns.Add("datatype");
         }
         DataRow row;
         if (userTable.Rows.Count == 0)
         {
             return(null);
         }
         row = userTable.Rows[0];
         return(Deserialize(row));
     }
     catch
     {
         return(null);
     }
 }
Example #5
0
 public object GetUserItem(string userName, UserStorageSections section)
 {
     try
     {
         DataTable userTable = GetUserTable(userName, section);
         if (!userTable.Columns.Contains("userdata"))
         {
             userTable.Columns.Add("userdata");
             userTable.Columns.Add("datatype");
         }
         DataRow row;
         if (userTable.Rows.Count == 0)
         {
             return null;
         }
         row = userTable.Rows[0];
         return Deserialize(row);
     }
     catch
     {
         return null;
     }
 }