コード例 #1
0
ファイル: UserCategoryFunctions.cs プロジェクト: domerobi/PFM
 /// <summary>
 /// Copy the values from the parameter object to self
 /// </summary>
 /// <param name="original">The original object to copy from</param>
 public void Copy(UserCategory original)
 {
     UserID                 = original.UserID;
     CategoryID             = original.CategoryID;
     User                   = original.User;
     Category               = original.Category;
     ExcludeFromCalculation = original.ExcludeFromCalculation;
     Priority               = original.Priority;
     Limit                  = original.Limit;
     CreateDate             = original.CreateDate;
     LastModify             = original.LastModify;
 }
コード例 #2
0
ファイル: UserCategoryFunctions.cs プロジェクト: domerobi/PFM
 /// <summary>
 /// Check if the current category is modified by comparing it with the given original category
 /// </summary>
 /// <param name="original">The original category, which need to be compared with self</param>
 /// <returns></returns>
 public bool IsModified(UserCategory original)
 {
     // compare the properties
     if (original.Category.CategoryName != Category.CategoryName ||
         original.Category.CategoryDirections.DirectionID != Category.CategoryDirections.DirectionID ||
         original.ExcludeFromCalculation != ExcludeFromCalculation ||
         original.Priority != Priority ||
         original.Limit != Limit)
     {
         return(true);
     }
     return(false);
 }