/// <summary>
 /// Generates the matrix for A new user.
 /// </summary>
 /// <param name="userID">The user ID.</param>
 public void GenerateMatrixForANewUser(int userID)
 {
     BLL.PhysicalStore phyStore = new PhysicalStore();
     phyStore.LoadAll();
     while (!phyStore.EOF)
     {
         BLL.UserPhysicalStore usrPhyStore = new UserPhysicalStore();
         usrPhyStore.AddNew();
         usrPhyStore.UserID = userID;
         usrPhyStore.PhysicalStoreID = phyStore.ID;
         usrPhyStore.CanAccess = false;
         usrPhyStore.IsDefault = false;
         usrPhyStore.Save();
         phyStore.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.PhysicalStore phyStore = new PhysicalStore();
     phyStore.LoadAll();
     while (!phyStore.EOF)
     {
         BLL.UserPhysicalStore usrPhyStore = new UserPhysicalStore();
         usrPhyStore.AddNew();
         usrPhyStore.UserID          = userID;
         usrPhyStore.PhysicalStoreID = phyStore.ID;
         usrPhyStore.CanAccess       = false;
         usrPhyStore.IsDefault       = false;
         usrPhyStore.Save();
         phyStore.MoveNext();
     }
 }
コード例 #3
0
 /// <summary>
 /// Renews the matrix for A user.
 /// </summary>
 /// <param name="userID">The user ID.</param>
 public void RenewMatrixForAUser(int userID)
 {
     BLL.PhysicalStore phyStore = new PhysicalStore();
     phyStore.LoadAll();
     while (!phyStore.EOF)
     {
         BLL.UserPhysicalStore usrPhyStore = new UserPhysicalStore();
         this.LoadByUserAndStoreID(userID, phyStore.ID);
         if (this.RowCount == 0)
         {
             usrPhyStore.AddNew();
             usrPhyStore.UserID          = userID;
             usrPhyStore.PhysicalStoreID = phyStore.ID;
             usrPhyStore.CanAccess       = false;
             usrPhyStore.IsDefault       = false;
             usrPhyStore.Save();
         }
         phyStore.MoveNext();
     }
 }
 /// <summary>
 /// Renews the matrix for A user.
 /// </summary>
 /// <param name="userID">The user ID.</param>
 public void RenewMatrixForAUser(int userID)
 {
     BLL.PhysicalStore phyStore = new PhysicalStore();
     phyStore.LoadAll();
     while (!phyStore.EOF)
     {
         BLL.UserPhysicalStore usrPhyStore = new UserPhysicalStore();
         this.LoadByUserAndStoreID(userID, phyStore.ID);
         if (this.RowCount == 0)
         {
             usrPhyStore.AddNew();
             usrPhyStore.UserID = userID;
             usrPhyStore.PhysicalStoreID = phyStore.ID;
             usrPhyStore.CanAccess = false;
             usrPhyStore.IsDefault = false;
             usrPhyStore.Save();
         }
         phyStore.MoveNext();
     }
 }
コード例 #5
0
 private void repoItemChkPhysicalStoreAllowed_CheckedChanged(object sender, EventArgs e)
 {
     DataRow dr = gridViewUserPhysicalStoreMatrix.GetFocusedDataRow();
     int ID = int.Parse(dr["ID"].ToString());
     BLL.UserPhysicalStore userPhyStore = new UserPhysicalStore();
     userPhyStore.LoadByPrimaryKey(ID);
     userPhyStore.CanAccess = !userPhyStore.CanAccess;
     userPhyStore.Save();
     RefreshUserPhysicalStoreGrid(userPhyStore.UserID);
 }