public void InsertBloodRequest(BloodRequest bloodRequest) { using (var cnn = OpenConnection()) { var id = cnn.Insert(bloodRequest); } }
public BloodRequest Map(BloodRequestForm form) { var newRequest = new BloodRequest(); newRequest.UnitsRequired = form.UnitsRequired; newRequest.BloodType = form.BloodType; newRequest.Date = DateTime.Now; newRequest.UserId = form.UserId; return newRequest; }
public BloodRequest Map(int n, BloodRequestForm form) { var newRequest = new BloodRequest(); newRequest.Id = n; newRequest.UnitsRequired = form.UnitsRequired; newRequest.BloodType = form.BloodType; newRequest.Date = DateTime.Now; newRequest.UserId = form.UserId; newRequest.NumDonator = form.NumDonator; return newRequest; }
public void UpdateBloodRequest(BloodRequest bloodRequest) { using (var cnn = OpenConnection()) { cnn.Update(bloodRequest); } }