コード例 #1
0
 /// <summary>
 /// Generates the matrix for A new user.
 /// </summary>
 /// <param name="userID">The user ID.</param>
 public void GenerateMatrixForANewUser(int userID)
 {
     BLL.Activity store = new Activity();
     store.LoadAll();
     while (!store.EOF)
     {
         BLL.UserActivity usrStore = new UserActivity();
         usrStore.AddNew();
         usrStore.UserID = userID;
         usrStore.ActivityID = store.ID;
         usrStore.CanAccess = false;
         usrStore.IsDefault = false;
         usrStore.Save();
         store.MoveNext();
     }
 }
コード例 #2
0
 /// <summary>
 /// Generates the matrix for A new user.
 /// </summary>
 /// <param name="userID">The user ID.</param>
 public void GenerateMatrixForANewUser(int userID)
 {
     BLL.Activity store = new Activity();
     store.LoadAll();
     while (!store.EOF)
     {
         BLL.UserActivity usrStore = new UserActivity();
         usrStore.AddNew();
         usrStore.UserID     = userID;
         usrStore.ActivityID = store.ID;
         usrStore.CanAccess  = false;
         usrStore.IsDefault  = false;
         usrStore.Save();
         store.MoveNext();
     }
 }
コード例 #3
0
 /// <summary>
 /// Renews the matrix for A user.
 /// </summary>
 /// <param name="userID">The user ID.</param>
 public void RenewMatrixForAUser(int userID)
 {
     BLL.Activity store = new Activity();
     store.LoadAll();
     while (!store.EOF)
     {
         BLL.UserActivity usrStore = new UserActivity();
         this.LoadByUserAndStoreID(userID, store.ID);
         if (this.RowCount == 0)
         {
             usrStore.AddNew();
             usrStore.UserID     = userID;
             usrStore.ActivityID = store.ID;
             usrStore.CanAccess  = false;
             usrStore.IsDefault  = false;
             usrStore.Save();
         }
         store.MoveNext();
     }
 }
コード例 #4
0
 /// <summary>
 /// Renews the matrix for A user.
 /// </summary>
 /// <param name="userID">The user ID.</param>
 public void RenewMatrixForAUser(int userID)
 {
     BLL.Activity store = new Activity();
     store.LoadAll();
     while (!store.EOF)
     {
         BLL.UserActivity usrStore = new UserActivity();
         this.LoadByUserAndStoreID(userID,store.ID);
         if (this.RowCount == 0)
         {
             usrStore.AddNew();
             usrStore.UserID = userID;
             usrStore.ActivityID = store.ID;
             usrStore.CanAccess = false;
             usrStore.IsDefault = false;
             usrStore.Save();
         }
         store.MoveNext();
     }
 }
コード例 #5
0
 private void repositoryItemCheckEdit1_CheckedChanged(object sender, EventArgs e)
 {
     DataRow dr = gridViewUserStoreMatrix.GetFocusedDataRow();
     int ID = int.Parse(dr["ID"].ToString());
     BLL.UserActivity userStore = new UserActivity();
     userStore.LoadByPrimaryKey(ID);
     userStore.CanAccess = !userStore.CanAccess;
     userStore.Save();
     RefreshUserStoreGrid(userStore.UserID);
 }