public bool DeleteDonor(Donor donor) { if (donor == null) return false; _unitOfWork.DonorRepository.Delete(donor); _unitOfWork.Save(); return true; }
public Donation() { Charges = new Charges(); Donor = new Donor(); FundraisingPage = new FundraisingPage(); ReferralWebsite = new ReferralWebsite(); }
public Donor Delete_Donor_select(int ID) { Donor = Donor.Select(ID); Delete_donor_id_txt_lbl.Text = Convert.ToString(Donor.donor_id); Delete_PersonID_txt_lbl.Text = Convert.ToString(Donor.PersonID); Delete_Status_txt_lbl.Text = Convert.ToString(Donor.Status); Delete_DonorType_txt_lbl.Text = Convert.ToString(Donor.DonorType); Delete_AgencyID_txt_lbl.Text = Convert.ToString(Donor.AgencyID); Delete_Phone_txt_lbl.Text = Convert.ToString(Donor.Phone); return Donor; }
public Donor Donor_insert() { Donor.PersonID = Convert.ToInt32(Insert_PersonID_txt.Text); Donor.Status = Insert_Status_txt.Text; Donor.DonorType = Insert_DonorType_txt.Text; Donor.AgencyID = Convert.ToInt32(Insert_AgencyID_txt.Text); Donor.Phone = Convert.ToInt32(Insert_Phone_txt.Text); Donor = Donor.Insert(Donor); Insert_Donor_GridView.DataBind(); Update_Donor_GridView.DataBind(); Delete_Donor_GridView.DataBind(); return Donor; }
public void registerDonor(Donor donor, string password) { using (SHA256 sha = SHA256.Create()) password = Convert.ToBase64String(sha.ComputeHash(Encoding.UTF8.GetBytes(password))); if (donors.Any(org => org.Email.Equals(donor.Email))) { throw new EmailAlreadyExistsException(); } else { donors.Add(donor); databaseAccess.saveDonors(donors); databaseAccess.addLogin(donor.Email, password, AccountType.Donor); } }
public Donor Donor_update(int ID) { Donor = Donor.Select(ID); Donor.donor_id = Convert.ToInt32(Update_donor_id_txt.Text); Donor.PersonID = Convert.ToInt32(Update_PersonID_txt.Text); Donor.Status = Update_Status_txt.Text; Donor.DonorType = Update_DonorType_txt.Text; Donor.AgencyID = Convert.ToInt32(Update_AgencyID_txt.Text); Donor.Phone = Convert.ToInt32(Update_Phone_txt.Text); Donor.Update(Donor); Insert_Donor_GridView.DataBind(); Update_Donor_GridView.DataBind(); Delete_Donor_GridView.DataBind(); return Donor; }
public int SaveDonor(Donor donor) { lock (locker) { if (donor.DonorID != 0) { database.Update(donor); return(donor.DonorID); } else { return(database.Insert(donor)); } } }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Donor = await _context.Donor.FirstOrDefaultAsync(m => m.ID == id); if (Donor == null) { return(NotFound()); } return(Page()); }
public Donor Donor_update(int ID) { Donor = Donor.Select(ID); Donor.donor_id = Convert.ToInt32(Update_donor_id_txt.Text); Donor.PersonID = Convert.ToInt32(Update_PersonID_txt.Text); Donor.Status = Update_Status_txt.Text; Donor.DonorType = Update_DonorType_txt.Text; Donor.AgencyID = Convert.ToInt32(Update_AgencyID_txt.Text); Donor.Phone = Convert.ToInt32(Update_Phone_txt.Text); Donor.Update(Donor); Insert_Donor_GridView.DataBind(); Update_Donor_GridView.DataBind(); Delete_Donor_GridView.DataBind(); return(Donor); }
public Donor Add(Donor entity) { var db = RealmHelper.GetInstance(); db.Write(() => { if (string.IsNullOrEmpty(entity.Id)) { entity.Id = Guid.NewGuid().ToString(); } db.Add(entity); }); return(entity); }
public bool UpdateDonor(Donor donor) { Donor dataDonor = entities.Donors.SingleOrDefault(d => d.DonorID == donor.DonorID); if (dataDonor != null) { dataDonor.Email = donor.Email; dataDonor.FirstName = donor.FirstName; dataDonor.LastName = donor.LastName; int updated = entities.SaveChanges(); return(updated > 0); } return(false); }
void SendDonor(Donor Donor) { (ServiceLocator.Current.GetInstance <MainViewModel>()).ToogleNavigation(); DonorDetailsMode = true; if (Donor == null) { SelectedDonor = new Donor(); InEdit = false; } else { InEdit = true; SelectedDonor = Donor; } }
public void Edit(Donor doador) { Donor donorOld = GetById(doador.Id); donorOld.Name = doador.Name; donorOld.Note = doador.Note; donorOld.Pessoa = doador.Pessoa; donorOld.Phone = doador.Phone; donorOld.Address = doador.Address; donorOld.City = doador.City; donorOld.CPF = doador.Email; donorOld.Email = doador.Email; Save(); }
// GET: Donors/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Donor donor = db.Donors.Find(id); if (donor == null) { return(HttpNotFound()); } ViewBag.DistrictId = new SelectList(db.Districts, "DistrictId", "Name", donor.DistrictId); return(View(donor)); }
//[HttpPost] //public async Task<IActionResult> Register(Donor donor) //{ // Donor don = new Donor(); // using (var httpClient = new HttpClient()) // { // //int id = verify.VerificationId; // StringContent content = new StringContent(JsonConvert.SerializeObject(donor), Encoding.UTF8, "application/json"); // using (var response = await httpClient.PostAsync("http://localhost:51177/api/Donors", content)) // { // string apiResponse = await response.Content.ReadAsStringAsync(); // //ViewBag.Result = "Success"; // don = JsonConvert.DeserializeObject<Donor>(apiResponse); // } // } // return RedirectToAction("Login","Login"); //} public async Task <IActionResult> Index(string name) { List <Donor> donorList = new List <Donor>(); Donation donation = new Donation(); string donarname; int totalamount; using (var httpClient = new HttpClient()) { // using (var response = await httpClient.GetAsync("http://localhost:51177/api/Donors")) { string apiResponse = await response.Content.ReadAsStringAsync(); donorList = JsonConvert.DeserializeObject <List <Donor> >(apiResponse); } } using (var httpClient = new HttpClient()) { using (var response = await httpClient.GetAsync("http://localhost:58271/api/Donation/getDonorNameWithMaxDonations")) { string apiResponse = await response.Content.ReadAsStringAsync(); // don = JsonConvert.DeserializeObject<int>(apiResponse); donarname = apiResponse; } } using (var httpClient = new HttpClient()) { using (var response = await httpClient.GetAsync("http://localhost:58271/api/Donation/totalAmount")) { string apiResponse = await response.Content.ReadAsStringAsync(); // don = JsonConvert.DeserializeObject<int>(apiResponse); totalamount = Convert.ToInt32(apiResponse); } } Donor donor = donorList.FirstOrDefault(d => d.DonorUserName == name); TempData["donarid"] = donor.DonorId; TempData["donorname"] = donor.DonorUserName; TempData["donarnamemax"] = donarname; TempData["totalamount"] = totalamount; return(View()); }
public async Task Post_create_direct_donation_success() { DirectDonationModel directDonationModel = new DirectDonationModel(); Causes causes = new Causes(); causes.Donation = 1; causes.CauseId = "cufa"; Donor donor = new Donor(); donor.Document = "01685303250"; donor.Email = "*****@*****.**"; donor.Gender = "male"; donor.Name = "Jeovane Araujo"; donor.Phone = "41998916810"; donor.BirthDate = "16/08/1995"; donor.Verified = false; donor.Identifier = "01685303250"; donor.OptIn = false; BankSlipData bankSlipData = new BankSlipData(); bankSlipData.DueDate = 1; bankSlipData.PaymentSystem = 5; directDonationModel.Address = null; directDonationModel.Causes = new Causes[] { causes }; directDonationModel.PaymentMethod = 2; directDonationModel.CreditCardData = null; directDonationModel.Donor = donor; directDonationModel.OrderId = "JEO12345678"; directDonationModel.StoreId = "30cc3743-a457-43ac-aa7c-a2bf7cdf674a"; directDonationModel.ChildStoreId = null; directDonationModel.IsTest = true; directDonationModel.CampaignId = null; directDonationModel.BankFeeCovered = 0; directDonationModel.HasMatchFunding = false; directDonationModel.MatchingDonation = 0; directDonationModel.BankSlipData = bankSlipData; directDonationModel.Notes = ""; var actionResult = await PolenApi.DirectDonation.CreateDirectDonation(directDonationModel); var viewResult = Assert.IsType <string>(actionResult); Assert.IsAssignableFrom <string>(viewResult); }
protected override object ObjectFromVestaRow(DBWrapper context, ExcelRow row, int year) { object retObj = null; string donor_name; GiftLabelInfo workObj = new GiftLabelInfo(); workObj.year = year; // If there's anything in the spreadsheet's "Donor ID" // column, use that to identify this row's donor. // Otherwise, use the "Donor Name" column. donor_name = row[this.field_indices["Donor Name"]]; // We know the donor name, but not code. If there's already // a Donor with this name, we're set -- just use that Donor // along with whatever code it has. Otherwise, make a Donor // from the name and add that to the database. Donor d = context.FindDonorByName(donor_name); if (d == null) { d = new Donor(donor_name); context.AddOrUpdateDonor(d); } workObj.donor_code = d.code; workObj.donor_name = d.name; int child_age; bool parsed_ok = int.TryParse(row[this.field_indices["Age"]], out child_age); if (!parsed_ok) { child_age = -1; } workObj.child_age = child_age; string scratch = (row[this.field_indices["Gender"]]).Substring(0, 1).ToUpper(); if (scratch != "M" && scratch != "F") { scratch = "NotSpecified"; } workObj.child_gender = scratch; workObj.child_name = row[this.field_indices["Family Member First Name"]]; workObj.family_id = row[this.field_indices["Family ID"]]; workObj.family_name = row[this.field_indices["Family Name"]]; workObj.request_detail = row[this.field_indices["Request Detail"]]; workObj.request_type = row[this.field_indices["Request Type"]]; retObj = workObj; return(retObj); }
public DonorInfoPage(Donor donor) { InitializeComponent(); txtID.IsEnabled = false; txtName.IsEnabled = false; txtLastname.IsEnabled = false; txtAddress.IsEnabled = false; txtPlace.IsEnabled = false; txtEmail.IsEnabled = false; txtPhone.IsEnabled = false; txtNextDate.IsEnabled = false; txtDateOfBirth.IsEnabled = false; txtSex.IsEnabled = false; imgBloodType.Source = new ImageSourceConverter().ConvertFromString(@"../../Resources/Blood_types/blood_" + donor.KrvnaGrupaDonor.ToString().ToLower() + ".png") as ImageSource; kontakti = JsonConvert.DeserializeObject <List <Kontakt> >(REST.JoinKontaktDonor(donor.DonorId)); kontakt = kontakti[0]; this.donor = donor; lokacija = kontakt.Lokacija; txtDateOfBirth.Text = donor.DatumRodjenja.ToString(); txtID.Text = donor.RegistarskiBroj; txtName.Text = donor.Ime; txtLastname.Text = donor.Prezime; txtAddress.Text = lokacija.Adresa; txtPlace.Text = lokacija.Mjesto; txtEmail.Text = kontakt.Email; txtPhone.Text = kontakt.BrojTelefona; if (donor.DatumNajranijegSledecegDoniranja.HasValue) { txtNextDate.Text = donor.DatumNajranijegSledecegDoniranja.Value.ToString(); } if (donor.Pol == "m") { txtSex.Text = "Muški"; } else { txtSex.Text = "Ženski"; } donacije = JsonConvert.DeserializeObject <List <Donacija> >(REST.JoinDonacijaDonor(donor.DonorId)); for (int i = 0; i < donacije.Count; i++) { datagridHistory.Items.Add(donacije[i]); } }
public bool Delete(Donor d) { //bool value set default ot false bool isSuccess = false; //object for connection SqlConnection conn = new SqlConnection(myconnstrng); try { //create string to hold query to delete string sql = "DELETE FROM Table_donor WHERE Donor_Id = @Donor_Id"; //create sql comand to execute query and pass the value to sql query SqlCommand cmd = new SqlCommand(sql, conn); //pass the value to query to delete cmd.Parameters.AddWithValue("@Donor_Id", d.Donor_Id); conn.Open(); //int vari to hold the values int rows = cmd.ExecuteNonQuery(); //values of row > 0 if query is executed //else 0 if (rows > 0) { isSuccess = true; } else { isSuccess = false; } } catch (Exception ex) { //display error if any exception error! MessageBox.Show(ex.Message); } finally { //disconnected conn.Close(); } return(isSuccess); }
private List <NormalizedDonor> normalizeData(List <Donor> donors) { Donor donorMax = new Donor(donors[0].Year, donors[0].OperationYear, donors[0].AxillaryNodes, donors[0].Status); Donor donorMin = new Donor(donors[0].Year, donors[0].OperationYear, donors[0].AxillaryNodes, donors[0].Status); foreach (Donor d in donors) { if (d.Year > donorMax.Year) { donorMax.Year = d.Year; } else if (d.Year < donorMin.Year) { donorMin.Year = d.Year; } if (d.OperationYear > donorMax.OperationYear) { donorMax.OperationYear = d.OperationYear; } else if (d.OperationYear < donorMin.OperationYear) { donorMin.OperationYear = d.OperationYear; } if (d.AxillaryNodes > donorMax.AxillaryNodes) { donorMax.AxillaryNodes = d.AxillaryNodes; } else if (d.AxillaryNodes < donorMin.AxillaryNodes) { donorMin.AxillaryNodes = d.AxillaryNodes; } if (d.Status > donorMax.Status) { donorMax.Status = d.Status; } else if (d.Status < donorMin.Status) { donorMin.Status = d.Status; } } List <NormalizedDonor> norm = new List <NormalizedDonor>(); foreach (Donor d in donors) { norm.Add(new NormalizedDonor((double)(d.Year - donorMin.Year) / (donorMax.Year - donorMin.Year), (double)(d.OperationYear - donorMin.OperationYear) / (donorMax.OperationYear - donorMin.OperationYear), (double)(d.AxillaryNodes - donorMin.AxillaryNodes) / (donorMax.AxillaryNodes - donorMin.AxillaryNodes), (double)(d.Status - donorMin.Status) / (donorMax.Status - donorMin.Status))); } return(norm); }
public ActionResult Details() { ApplicationUser user = currentUserProvider.Get(); Donor donor = this.donorProfileService.GetByApplicationUserId(user.Id); if (donor == null) { return(HttpNotFound()); } DonorDetailsViewModel model = Mapper.Map <Donor, DonorDetailsViewModel>(donor); model.AccountDetailsViewModel = Mapper.Map <ApplicationUser, AccountDetailsViewModel>(donor.ApplicationUser); return(View(model)); }
public DonorDTO CreateDonor(DonorDTO donorDTO) { Donor retVal = null; using (var context = new BankaContext()) //citava baza mi je u prom context sada { retVal = new Donor(donorDTO); context.Donori.Add(retVal); context.SaveChanges(); } if (retVal == null) { return(null); } return(new DonorDTO(retVal.Id, retVal.Ime, retVal.KrvnaGrupa, retVal.Prezime)); }
public JsonResult DeleteDonor(int donorID) { BloodDonorDBEntities db = new BloodDonorDBEntities(); bool result = false; Donor don = db.Donors.SingleOrDefault(x => x.DonorIsDeleted == false && x.DonorID == donorID); if (don != null) { don.DonorIsDeleted = true; db.SaveChanges(); result = true; } return(Json(result, JsonRequestBehavior.AllowGet)); }
private void LoadData(Donor donor1) { txtId.Text = donor1.DrId.ToString(); txtName.Text = donor1.Name; txtAddress.Text = donor1.Locations.Address; txtEmail.Text = donor1.Email; txtPhone.Text = donor1.Phone; txtState.Text = donor1.Locations.State; txtZipCode.Text = donor1.Locations.ZipCode.ToString(); txtCity.Text = donor1.Locations.City; txtCountry.Text = donor1.Locations.Country; comboBloodGroup.SelectedIndex = comboBloodGroup.Items.IndexOf(donor1.BloodGroup); txtAddressId.Text = donor1.Locations.LocationId.ToString(); txtBirthdate.Value = donor1.Birthdate; txtLastDonateDate.Value = donor1.LastDonetDate; }
public ActionResult DonorDetails(String code) { if (code == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Donor donor = db.Donor.SingleOrDefault(d => d.Email == code); // User myUser = myDBContext.Users.SingleOrDefault(user => user.Username == username); if (donor == null) { return(HttpNotFound()); } return(View(donor)); // return View(); }
public async Task <Token> Login(Donor donor) { var postData = new List <KeyValuePair <string, string> >(); postData.Add(new KeyValuePair <string, string>("grant_type", grant_type)); postData.Add(new KeyValuePair <string, string>("username", donor.Username)); postData.Add(new KeyValuePair <string, string>("password", donor.Password)); var content = new FormUrlEncodedContent(postData); var response = await PostResponseLogin <Token>(Constants.LoginUrl, content); DateTime dt = new DateTime(); dt = DateTime.Today; response.expire_date = dt.AddSeconds(response.expire_in); return(response); }
public void OnPageLoaded(object loggedUser, object donationRecipient) { user = Get <Donor>(loggedUser); recipient = Get <Organization>(donationRecipient); availableItems = Database.GetAll(new ItemsDetails(), new ItemsDetailsMapper()); foreach (Item item in availableItems) { var unit = Database.Get(new UnitDetails(), new UnitDetailsMapper(), new UnitDetailsParameters(item)); measurementUnit[item] = unit; } view.ShowItems(availableItems, selectedItems, measurementUnit, donationQuantities); }
public void The_PutDonor_Action_returns_NotFound_statuscode_When_The_Donor_Does_NOT_Exists() { // Arrange DonationManagementController controller = SetupControllerForTests(mockDonorRepo, mockDonationRepo, mockProjectRepo); Donor donor = donors.SingleOrDefault(u => u.DonorID == 2); int fakeId = 345; // Act HttpResponseMessage result = controller.Put(fakeId, donor); // Assert Assert.IsInstanceOfType(typeof(HttpResponseMessage), result, "Should have returned an HttpResponseMessage"); Assert.IsNotNull(result, "Should have returned a HttpResponseMessage"); Assert.IsFalse(result.IsSuccessStatusCode, "Status Code Should be success"); Assert.AreEqual(HttpStatusCode.NotModified, result.StatusCode, "Invalid status code"); }
private static void FillHealthDeclaration() { var donor = new Donor(Guid.NewGuid(), false, BloodType.ABn); var bloodDonation = bloodBank.StartBloodDonation(donor); var questionaire = AnswerQuestionaire(donor); var healthDeclaration = new HealthDeclaration(questionaire); bloodDonation.AddHealthDeclaration(healthDeclaration); if (questionaire.IsBlocked) { Console.WriteLine("You can not give blood:"); Console.WriteLine(questionaire.BlockReason); bloodBank.AbortDonation(bloodDonation); throw new Exception(); } }
public static Response createGetAllDonorsResponse(IEnumerable <MPP_TeledonClientServer.model.Donor> donors) { Response response = new Response { Type = Response.Types.Type.GetAllDonors }; foreach (MPP_TeledonClientServer.model.Donor donor in donors) { Donor protoDonor = new Donor { Id = donor.Id, Name = donor.Name, Address = donor.Address, Telephone = donor.Telephone }; response.Donors.Add(protoDonor); } return(response); }
// GET: Donors/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Donor donor = db.Donors.Find(id); if (donor == null) { return(HttpNotFound()); } ViewBag.Gender_ID = new SelectList(db.Genders, "Gender_ID", "Gender_Description", donor.Gender_ID); ViewBag.User_ID = new SelectList(db.Users, "User_ID", "Username", donor.User_ID); return(View(donor)); }
public IHttpActionResult Post([FromBody] Donor donorUser) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var user = new Donor() { Username = donorUser.Username, }; db.Donors.Add(user); db.SaveChanges(); return(StatusCode(HttpStatusCode.Created)); }
/** * Evaluates a donor, if the donor passes the test( the bool is true), updates it's status from pending to donated and sends him a mail, * otherwise removes the donor from the list and sends him a mail. */ public void evaluateDonor(bool b, Donor d) { if (b) { d.isPending = false; this.service.UpdateOneFromDatabase(d); Refresh(); //TODO : send mail } else { this.service.DeleteFromDatabase(d); Refresh(); //TODO : send mail } }
private void AddRow(Donor donor) { var index = donor_data.Rows.Add(); donor_data.Rows[index].Cells["_Name"].Value = donor.Name; donor_data.Rows[index].Cells["BloodGroup"].Value = donor.BloodGroup; donor_data.Rows[index].Cells["Age"].Value = donor.Age; donor_data.Rows[index].Cells["Sex"].Value = donor.Sex; donor_data.Rows[index].Cells["StreetAddress"].Value = donor.StreetAddress; donor_data.Rows[index].Cells["City"].Value = donor.City; donor_data.Rows[index].Cells["State"].Value = donor.State; donor_data.Rows[index].Cells["Date"].Value = donor.Date; donor_data.Rows[index].Cells["PhoneNumber"].Value = donor.PhoneNumber; donor_data.Rows[index].Cells["Email"].Value = donor.Email; donor_data.Rows[index].Cells["Rh"].Value = donor.Rh; }
public async ValueTask <IActionResult> Post([FromBody] DonorCreateViewModel model) { if (ModelState.IsValid) { Donor donor = model.Convert <DonorCreateViewModel, Donor>(_mapper); donor.DateDonated = DateTime.Now; (bool succeeded, Donor addedDonor, string error) = await _repo.Add(donor); if (succeeded) { return(Ok(addedDonor)); } return(BadRequest(new { Message = error })); } return(BadRequest(new { Errors = ModelState.Values.SelectMany(e => e.Errors).ToList() })); }
protected void Button1_Click(object sender, EventArgs e) { //on the button click we make an instance of our donor //class and then write the values in the text boxes //to the class properties Donor donor = new Donor(); donor.FirstName = txtFirstName.Text; donor.LastName = txtLastName.Text; donor.Phone = txtPhone.Text; donor.Email = txtEmail.Text; donor.Donation = double.Parse(txtDonation.Text); //we create a session variable to store our class //with all the values in it //so we can access it on other pages Session["donation"] = donor; //then we redirect to the second page Response.Redirect("Default2.aspx"); }
protected void btnSubmit_Click(object sender, EventArgs e) { //instantiate the Donor object Donor d = new Donor(); //assign the values from the text fields to the poperties d.FirstName = txtFirstName.Text; d.LastName = txtLastName.Text; d.Address = txtAddress.Text; d.City = txtCity.Text; d.State = txtState.Text; d.Zip = txtZip.Text; d.Phone = txtPhone.Text; d.Email = txtEmail.Text; d.DonationAmount = double.Parse(txtDonationAmount.Text); //save the object to a session variable Session["NewDonor"] = d; //Redirect to the next page Response.Redirect("Default2.aspx"); }
public virtual ExitCode compileAlt() { if (inPlayground || inTest) { var scala = file != null ? new Scala(file, arguments): new Scala(dir, arguments); return scala.compileAlt(); } else { var status = runAnt("build"); if (!status) return status; var partest = project + @"\build\locker\classes\partest"; if (!Directory.Exists(partest)) { var donor = new Donor(new DirectoryInfo(new Donor().project), arguments); return donor.compile(); } else { return 0; } } }
protected void Insert_Select_Record(object sender, EventArgs e) { Donor = Insert_Donor_select(Convert.ToInt32(Insert_Donor_GridView.SelectedValue)); }
protected void INSERT(object sender, EventArgs e) { Donor = Donor_insert(); }
protected void UPDATE(object sender, EventArgs e) { Donor = Donor_update(Convert.ToInt32(Update_Donor_GridView.SelectedValue)); }
protected void Update_Select_Record(object sender, EventArgs e) { Donor = Update_Donor_select(Convert.ToInt32(Update_Donor_GridView.SelectedValue)); }
public bool EditDonor(Donor donor) { _unitOfWork.DonorRepository.Edit(donor); _unitOfWork.Save(); return true; }
public bool AddDonor(Donor donor) { _unitOfWork.DonorRepository.Add(donor); _unitOfWork.Save(); return true; }
public Donor Insert_Donor_select(int ID) { Donor = Donor.Select(ID); Insert_PersonID_txt.Text = Convert.ToString(Donor.PersonID); Insert_Status_txt.Text = Convert.ToString(Donor.Status); Insert_DonorType_txt.Text = Convert.ToString(Donor.DonorType); Insert_AgencyID_txt.Text = Convert.ToString(Donor.AgencyID); Insert_Phone_txt.Text = Convert.ToString(Donor.Phone); return Donor; }