Esempio n. 1
0
 private void SetMemberData(DAL.Membership dlgData, ref VRSDataSet.tblMembershipRow row)
 {
     if (row.IsNull("Name") || !row.Name.Equals(dlgData.Name))
     {
         row.Name = dlgData.Name;
     }
     if (row.IsNull("Male") || !row.Male.Equals(dlgData.Male))
     {
         row.Male = dlgData.Male;
     }
     if (row.IsNull("Birthday") || !row.Birthday.Equals(dlgData.Birthday))
     {
         row.Birthday = dlgData.Birthday;
     }
     if (row.IsNull("ZipCode") || !row.Zipcode.Equals(dlgData.ZipCode))
     {
         row.Zipcode = dlgData.ZipCode;
     }
     if (row.IsNull("Addr") || !row.Addr.Equals(dlgData.Addr))
     {
         row.Addr = dlgData.Addr;
     }
     if (row.IsNull("Addr2") || !row.Addr2.Equals(dlgData.AddrDetail))
     {
         row.Addr2 = dlgData.AddrDetail;
     }
     if (row.IsNull("Cellphone") || !row.Cellphone.Equals(dlgData.Cellphone))
     {
         row.Cellphone = dlgData.Cellphone;
     }
     if (row.IsNull("GradeCode") || !row.GradeCode.Equals(dlgData.MGradeCode))
     {
         row.GradeCode = dlgData.MGradeCode;
     }
     if (row.IsNull("Deposit") || !row.Deposit.Equals(dlgData.MDeposit))
     {
         row.Deposit = dlgData.MDeposit;
     }
 }
 /// <summary>
 /// Create a new Membership object.
 /// </summary>
 /// <param name="applicationId">Initial value of the ApplicationId property.</param>
 /// <param name="userId">Initial value of the UserId property.</param>
 /// <param name="password">Initial value of the Password property.</param>
 /// <param name="passwordFormat">Initial value of the PasswordFormat property.</param>
 /// <param name="passwordSalt">Initial value of the PasswordSalt property.</param>
 /// <param name="isApproved">Initial value of the IsApproved property.</param>
 /// <param name="isLockedOut">Initial value of the IsLockedOut property.</param>
 /// <param name="createDate">Initial value of the CreateDate property.</param>
 /// <param name="lastLoginDate">Initial value of the LastLoginDate property.</param>
 /// <param name="lastPasswordChangedDate">Initial value of the LastPasswordChangedDate property.</param>
 /// <param name="lastLockoutDate">Initial value of the LastLockoutDate property.</param>
 /// <param name="failedPasswordAttemptCount">Initial value of the FailedPasswordAttemptCount property.</param>
 /// <param name="failedPasswordAttemptWindowStart">Initial value of the FailedPasswordAttemptWindowStart property.</param>
 /// <param name="failedPasswordAnswerAttemptCount">Initial value of the FailedPasswordAnswerAttemptCount property.</param>
 /// <param name="failedPasswordAnswerAttemptWindowsStart">Initial value of the FailedPasswordAnswerAttemptWindowsStart property.</param>
 public static Membership CreateMembership(global::System.Guid applicationId, global::System.Guid userId, global::System.String password, global::System.Int32 passwordFormat, global::System.String passwordSalt, global::System.Boolean isApproved, global::System.Boolean isLockedOut, global::System.DateTime createDate, global::System.DateTime lastLoginDate, global::System.DateTime lastPasswordChangedDate, global::System.DateTime lastLockoutDate, global::System.Int32 failedPasswordAttemptCount, global::System.DateTime failedPasswordAttemptWindowStart, global::System.Int32 failedPasswordAnswerAttemptCount, global::System.DateTime failedPasswordAnswerAttemptWindowsStart)
 {
     Membership membership = new Membership();
     membership.ApplicationId = applicationId;
     membership.UserId = userId;
     membership.Password = password;
     membership.PasswordFormat = passwordFormat;
     membership.PasswordSalt = passwordSalt;
     membership.IsApproved = isApproved;
     membership.IsLockedOut = isLockedOut;
     membership.CreateDate = createDate;
     membership.LastLoginDate = lastLoginDate;
     membership.LastPasswordChangedDate = lastPasswordChangedDate;
     membership.LastLockoutDate = lastLockoutDate;
     membership.FailedPasswordAttemptCount = failedPasswordAttemptCount;
     membership.FailedPasswordAttemptWindowStart = failedPasswordAttemptWindowStart;
     membership.FailedPasswordAnswerAttemptCount = failedPasswordAnswerAttemptCount;
     membership.FailedPasswordAnswerAttemptWindowsStart = failedPasswordAnswerAttemptWindowsStart;
     return membership;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Memberships EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToMemberships(Membership membership)
 {
     base.AddObject("Memberships", membership);
 }