public Voter Create(VoterModel model) { return(new Voter { VotName = model.VotName, StaffNo = model.StaffNo, CreatedBy = model.CreatedBy, CreatedDate = DateTime.Now, ModifiedDate = DateTime.Now }); }
public Voter Edit(Voter entity, VoterModel model) { // entity.VoterId = model.VoterId; entity.UserId = model.UserId; entity.StaffName = model.StaffName; entity.StaffNo = model.StaffNo; entity.Email = model.Email; //entity.CreatedBy = model.CreatedBy; entity.ModifiedBy = model.ModifiedBy; entity.ModifiedDate = DateTime.Now; return(entity); }
public Voter Create(VoterModel model) { return(new Voter { UserId = model.UserId, StaffName = model.StaffName, StaffNo = model.StaffNo, Email = model.Email, CreatedBy = model.CreatedBy, CreatedDate = DateTime.Now, //ModifiedDate = DateTime.Now }); }
public ScoreModel(Score scores) { this.Assign(scores); Restaurant = new RestaurantModel(); Voters = new VoterModel(); }
public RatingModel(Rating ratings) { this.Assign(ratings); Restaurant = new RestaurantModel(); Voters = new VoterModel(); }