private void PINNo_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { Phone1.Focus(); } }
public async Task <IHttpActionResult> PutPhone1(int id, Phone1 phone1) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != phone1.PhoneId) { return(BadRequest()); } db.Entry(phone1).State = EntityState.Modified; try { await db.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Phone1Exists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public async Task <ActionResult> DeleteConfirmed(int id) { Phone1 phone1 = await db.Phone1.FindAsync(id); db.Phone1.Remove(phone1); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <IHttpActionResult> GetPhone1(int id) { Phone1 phone1 = await db.Phone1.FindAsync(id); if (phone1 == null) { return(NotFound()); } return(Ok(phone1)); }
public async Task <IHttpActionResult> PostPhone1(Phone1 phone1) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.Phone1.Add(phone1); await db.SaveChangesAsync(); return(CreatedAtRoute("DefaultApi", new { id = phone1.PhoneId }, phone1)); }
public async Task <ActionResult> Edit([Bind(Include = "PhoneId,PerfilId,PhoneNumber,DescriptionPhone,LastUpdate")] Phone1 phone1) { if (ModelState.IsValid) { db.Entry(phone1).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.PerfilId = new SelectList(db.PerfilGenerals, "PerfilId", "Name", phone1.PerfilId); return(View(phone1)); }
public async Task <IHttpActionResult> DeletePhone1(int id) { Phone1 phone1 = await db.Phone1.FindAsync(id); if (phone1 == null) { return(NotFound()); } db.Phone1.Remove(phone1); await db.SaveChangesAsync(); return(Ok(phone1)); }
// GET: Phone1/Details/5 public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Phone1 phone1 = await db.Phone1.FindAsync(id); if (phone1 == null) { return(HttpNotFound()); } return(View(phone1)); }
// GET: Phone1/Edit/5 public async Task <ActionResult> Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Phone1 phone1 = await db.Phone1.FindAsync(id); if (phone1 == null) { return(HttpNotFound()); } ViewBag.PerfilId = new SelectList(db.PerfilGenerals, "PerfilId", "Name", phone1.PerfilId); return(View(phone1)); }
public override bool Collect(AbstractDataCollector <TEntity> collector) { if (collector == null) { return(false); } ActiveCollector = collector; ID = ((ISupplierViewer)ActiveCollector.ActiveViewer).ID; if (ActiveDBItem == null) { return(false); } if (FirstName != null) { ((Person_cu)ActiveDBItem).FirstName_P = FirstName.ToString(); } if (SecondName != null) { ((Person_cu)ActiveDBItem).SecondName_P = SecondName.ToString(); } if (ThirdName != null) { ((Person_cu)ActiveDBItem).ThirdName_P = ThirdName.ToString(); } if (FourthName != null) { ((Person_cu)ActiveDBItem).FourthName_P = FourthName.ToString(); } if (MaritalStatus != null) { ((Person_cu)ActiveDBItem).MaritalStatus_P_ID = Convert.ToInt32(MaritalStatus); } if (Gender != null) { ((Person_cu)ActiveDBItem).Gender = Convert.ToBoolean(Gender); } if (BirthDate != null) { ((Person_cu)ActiveDBItem).BirthDate = Convert.ToDateTime(BirthDate); } if (Mobile1 != null) { ((Person_cu)ActiveDBItem).Mobile1 = Mobile1.ToString(); } if (Mobile2 != null) { ((Person_cu)ActiveDBItem).Mobile2 = Mobile2.ToString(); } if (Phone1 != null) { ((Person_cu)ActiveDBItem).Phone1 = Phone1.ToString(); } if (Phone2 != null) { ((Person_cu)ActiveDBItem).Phone2 = Phone2.ToString(); } if (Address != null) { ((Person_cu)ActiveDBItem).Address = Address.ToString(); } if (Email != null) { ((Person_cu)ActiveDBItem).EMail = Email.ToString(); } if (IdentificationCardType != null) { ((Person_cu)ActiveDBItem).IdentificationCardType_P_ID = Convert.ToInt32(IdentificationCardType); } if (IdentificationCardNumber != null) { ((Person_cu)ActiveDBItem).IdentificationCardNumber = IdentificationCardNumber.ToString(); } if (IdentificationCardIssueDate != null) { ((Person_cu)ActiveDBItem).IdentificationCardIssuingDate = Convert.ToDateTime(IdentificationCardIssueDate); } if (IdentificationCardExpirationDate != null) { ((Person_cu)ActiveDBItem).IdentificationCardExpirationDate = Convert.ToDateTime(IdentificationCardExpirationDate); } if (((Person_cu)ActiveDBItem).Supplier_cu == null) { ((Person_cu)ActiveDBItem).Supplier_cu = new Supplier_cu(); } if (InternalCode != null) { ((Person_cu)ActiveDBItem).Supplier_cu.InternalCode = InternalCode.ToString(); } if (((Person_cu)ActiveDBItem).Supplier_cu != null) { ((Person_cu)ActiveDBItem).Supplier_cu.IsOnDuty = true; } ((Person_cu)ActiveDBItem).IsOnDuty = true; switch (((ISupplierViewer)ActiveCollector.ActiveViewer).CommonTransactionType) { case DB_CommonTransactionType.DeleteExisting: ((Person_cu)ActiveDBItem).IsOnDuty = false; if (((Person_cu)ActiveDBItem).Supplier_cu != null) { ((Person_cu)ActiveDBItem).Supplier_cu.IsOnDuty = false; } break; } RelatedViewers = ((ISupplierViewer)ActiveCollector.ActiveViewer).RelatedViewers; return(true); }
public override bool Collect(AbstractDataCollector <TEntity> collector) { if (collector == null) { return(false); } ActiveCollector = collector; ID = ((IDoctorViewer)ActiveCollector.ActiveViewer).ID; if (ActiveDBItem == null) { return(false); } if (((Person_cu)ActiveDBItem).Doctor_cu == null) { ((Person_cu)ActiveDBItem).Doctor_cu = new Doctor_cu(); } if (((Person_cu)ActiveDBItem).User_cu == null) { ((Person_cu)ActiveDBItem).User_cu = new User_cu(); } #region General Person Details if (FirstName_P != null) { ((Person_cu)ActiveDBItem).FirstName_P = FirstName_P.ToString(); } if (SecondName_P != null) { ((Person_cu)ActiveDBItem).SecondName_P = SecondName_P.ToString(); } if (ThirdName_P != null) { ((Person_cu)ActiveDBItem).ThirdName_P = ThirdName_P.ToString(); } if (FourthName_P != null) { ((Person_cu)ActiveDBItem).FourthName_P = FourthName_P.ToString(); } if (Gender != null) { ((Person_cu)ActiveDBItem).Gender = Convert.ToBoolean(Gender); } if (MaritalStatusID != null) { ((Person_cu)ActiveDBItem).MaritalStatus_P_ID = Convert.ToInt32(MaritalStatusID); } if (BirthDate != null) { ((Person_cu)ActiveDBItem).BirthDate = Convert.ToDateTime(BirthDate); } if (Phone1 != null) { ((Person_cu)ActiveDBItem).Phone1 = Phone1.ToString(); } if (Phone2 != null) { ((Person_cu)ActiveDBItem).Phone2 = Phone2.ToString(); } if (Address != null) { ((Person_cu)ActiveDBItem).Address = Address.ToString(); } if (EMail != null) { ((Person_cu)ActiveDBItem).EMail = EMail.ToString(); } if (IdentificationCardTypeID != null) { ((Person_cu)ActiveDBItem).IdentificationCardType_P_ID = Convert.ToInt32(IdentificationCardTypeID); } if (IdentificationCardNumber != null) { ((Person_cu)ActiveDBItem).IdentificationCardNumber = IdentificationCardNumber.ToString(); } if (IdentificationCardIssuingDate != null) { ((Person_cu)ActiveDBItem).IdentificationCardIssuingDate = Convert.ToDateTime(IdentificationCardIssuingDate); } if (IdentificationCardExpirationDate != null) { ((Person_cu)ActiveDBItem).IdentificationCardExpirationDate = Convert.ToDateTime(IdentificationCardExpirationDate); } if (Mobile1 != null) { ((Person_cu)ActiveDBItem).Mobile1 = Mobile1.ToString(); } if (Mobile2 != null) { ((Person_cu)ActiveDBItem).Mobile2 = Mobile2.ToString(); } ((Person_cu)ActiveDBItem).IsOnDuty = true; #endregion #region User Details if (InternalCode != null) { ((Person_cu)ActiveDBItem).User_cu.InternalCode = InternalCode.ToString(); } if (LoginName != null) { ((Person_cu)ActiveDBItem).User_cu.LoginName = LoginName.ToString(); } if (Password != null) { ((Person_cu)ActiveDBItem).User_cu.Password = Password.ToString(); } ((Person_cu)ActiveDBItem).User_cu.OragnizationID = (int)ApplicationStaticConfiguration.Organization; ((Person_cu)ActiveDBItem).User_cu.IsOnDuty = true; #endregion #region Doctor Details if (InternalCode != null) { ((Person_cu)ActiveDBItem).Doctor_cu.InternalCode = InternalCode.ToString(); } if (DoctorRankID != null) { ((Person_cu)ActiveDBItem).Doctor_cu.DoctorRank_P_ID = Convert.ToInt32(DoctorRankID); } if (DoctorSpecializationID != null) { ((Person_cu)ActiveDBItem).Doctor_cu.DoctorSpecialization_P_ID = Convert.ToInt32(DoctorSpecializationID); } if (DoctorCategoryID != null) { ((Person_cu)ActiveDBItem).Doctor_cu.DoctorCategory_CU_ID = Convert.ToInt32(DoctorCategoryID); } if (DoctorProfessionalFees != null) { ((Person_cu)ActiveDBItem).Doctor_cu.DoctorProfessionalFeesIssuingType_P_ID = Convert.ToInt32(DoctorProfessionalFees); } if (DoctorTaxTypeID != null) { ((Person_cu)ActiveDBItem).Doctor_cu.DoctorTaxType_CU_ID = Convert.ToInt32(DoctorTaxTypeID); } if (PrivateMobile != null) { ((Person_cu)ActiveDBItem).Doctor_cu.PrivateMobile = PrivateMobile.ToString(); } if (Description != null) { ((Person_cu)ActiveDBItem).Doctor_cu.Description = Description.ToString(); } ((Person_cu)ActiveDBItem).Doctor_cu.IsOnDuty = true; #endregion switch (((IDoctorViewer)ActiveCollector.ActiveViewer).CommonTransactionType) { case DB_CommonTransactionType.DeleteExisting: ((Person_cu)ActiveDBItem).IsOnDuty = false; ((Person_cu)ActiveDBItem).User_cu.IsOnDuty = false; ((Person_cu)ActiveDBItem).Doctor_cu.IsOnDuty = false; break; } RelatedViewers = ((IDoctorViewer)ActiveCollector.ActiveViewer).RelatedViewers; return(true); }
/// <summary> /// Get the GEDCOM 5.5 lines for the data in this object. /// Lines start at the given level /// </summary> /// <param name="sw"> /// A <see cref="TextWriter"/> /// </param> /// <param name="level"> /// A <see cref="int"/> /// </param> public void Output(TextWriter sw, int level) { sw.Write(Environment.NewLine); sw.Write(Util.IntToString(level)); sw.Write(" ADDR"); if (!string.IsNullOrEmpty(AddressLine)) { sw.Write(" "); Util.SplitLineText(sw, AddressLine, level, 60, 3, true); } string levelStr = null; string levelPlusOne = null; if (!string.IsNullOrEmpty(AddressLine1)) { if (levelPlusOne == null) { levelPlusOne = Util.IntToString(level + 1); } string line = AddressLine1.Replace("@", "@@"); sw.Write(Environment.NewLine); sw.Write(levelPlusOne); sw.Write(" ADR1 "); if (line.Length <= 60) { sw.Write(AddressLine1); } else { sw.Write(line.Substring(0, 60)); System.Diagnostics.Debug.WriteLine("Truncating AddressLine1"); } } if (!string.IsNullOrEmpty(AddressLine2)) { if (levelPlusOne == null) { levelPlusOne = Util.IntToString(level + 1); } string line = AddressLine2.Replace("@", "@@"); sw.Write(Environment.NewLine); sw.Write(levelPlusOne); sw.Write(" ADR2 "); if (line.Length <= 60) { sw.Write(line); } else { sw.Write(line.Substring(0, 60)); System.Diagnostics.Debug.WriteLine("Truncating AddressLine2"); } } if (!string.IsNullOrEmpty(AddressLine3)) { if (levelPlusOne == null) { levelPlusOne = Util.IntToString(level + 1); } string line = AddressLine3.Replace("@", "@@"); sw.Write(Environment.NewLine); sw.Write(levelPlusOne); sw.Write(" ADR3 "); if (line.Length <= 60) { sw.Write(line); } else { sw.Write(line.Substring(0, 60)); System.Diagnostics.Debug.WriteLine("Truncating AddressLine3"); } } if (!string.IsNullOrEmpty(City)) { if (levelPlusOne == null) { levelPlusOne = Util.IntToString(level + 1); } string line = City.Replace("@", "@@"); sw.Write(Environment.NewLine); sw.Write(levelPlusOne); sw.Write(" CITY "); if (line.Length <= 60) { sw.Write(line); } else { sw.Write(line.Substring(0, 60)); System.Diagnostics.Debug.WriteLine("Truncating City"); } } if (!string.IsNullOrEmpty(State)) { if (levelPlusOne == null) { levelPlusOne = Util.IntToString(level + 1); } string line = State.Replace("@", "@@"); sw.Write(Environment.NewLine); sw.Write(levelPlusOne); sw.Write(" STAE "); if (line.Length <= 60) { sw.Write(line); } else { sw.Write(line.Substring(0, 60)); System.Diagnostics.Debug.WriteLine("Truncating State"); } } if (!string.IsNullOrEmpty(PostCode)) { if (levelPlusOne == null) { levelPlusOne = Util.IntToString(level + 1); } string line = PostCode.Replace("@", "@@"); sw.Write(Environment.NewLine); sw.Write(levelPlusOne); sw.Write(" POST "); if (line.Length <= 10) { sw.Write(line); } else { sw.Write(line.Substring(0, 10)); System.Diagnostics.Debug.WriteLine("Truncating PostCode"); } } if (!string.IsNullOrEmpty(Country)) { if (levelPlusOne == null) { levelPlusOne = Util.IntToString(level + 1); } string line = Country.Replace("@", "@@"); sw.Write(Environment.NewLine); sw.Write(levelPlusOne); sw.Write(" CTRY "); if (line.Length <= 60) { sw.Write(line); } else { sw.Write(line.Substring(0, 60)); System.Diagnostics.Debug.WriteLine("Truncating Country"); } } if (!string.IsNullOrEmpty(Phone1)) { if (levelStr == null) { levelStr = Util.IntToString(level); } string line = Phone1.Replace("@", "@@"); sw.Write(Environment.NewLine); sw.Write(levelStr); sw.Write(" PHON "); if (line.Length <= 25) { sw.Write(line); } else { sw.Write(line.Substring(0, 25)); System.Diagnostics.Debug.WriteLine("Truncating Phone1"); } } if (!string.IsNullOrEmpty(Phone2)) { if (levelStr == null) { levelStr = Util.IntToString(level); } string line = Phone2.Replace("@", "@@"); sw.Write(Environment.NewLine); sw.Write(levelStr); sw.Write(" PHON "); if (line.Length <= 25) { sw.Write(line); } else { sw.Write(line.Substring(0, 25)); System.Diagnostics.Debug.WriteLine("Truncating Phone2"); } } if (!string.IsNullOrEmpty(Phone3)) { if (levelStr == null) { levelStr = Util.IntToString(level); } string line = Phone3.Replace("@", "@@"); sw.Write(Environment.NewLine); sw.Write(levelStr); sw.Write(" PHON "); if (line.Length <= 25) { sw.Write(line); } else { sw.Write(line.Substring(0, 25)); System.Diagnostics.Debug.WriteLine("Truncating Phone3"); } } if (!string.IsNullOrEmpty(Fax1)) { if (levelStr == null) { levelStr = Util.IntToString(level); } string line = Fax1.Replace("@", "@@"); sw.Write(Environment.NewLine); sw.Write(levelStr); sw.Write(" FAX "); if (line.Length <= 60) { sw.Write(line); } else { sw.Write(line.Substring(0, 60)); System.Diagnostics.Debug.WriteLine("Truncating Fax1"); } } if (!string.IsNullOrEmpty(Fax2)) { if (levelStr == null) { levelStr = Util.IntToString(level); } string line = Fax2.Replace("@", "@@"); sw.Write(Environment.NewLine); sw.Write(levelStr); sw.Write(" FAX "); if (line.Length <= 60) { sw.Write(line); } else { sw.Write(line.Substring(0, 60)); System.Diagnostics.Debug.WriteLine("Truncating Fax2"); } } if (!string.IsNullOrEmpty(Fax3)) { if (levelStr == null) { levelStr = Util.IntToString(level); } string line = Fax3.Replace("@", "@@"); sw.Write(Environment.NewLine); sw.Write(levelStr); sw.Write(" FAX "); if (line.Length <= 60) { sw.Write(line); } else { sw.Write(line.Substring(0, 60)); System.Diagnostics.Debug.WriteLine("Truncating Fax3"); } } if (!string.IsNullOrEmpty(Email1)) { if (levelStr == null) { levelStr = Util.IntToString(level); } string line = Email1.Replace("@", "@@"); sw.Write(Environment.NewLine); sw.Write(levelStr); sw.Write(" EMAIL "); if (line.Length <= 120) { sw.Write(line); } else { sw.Write(line.Substring(0, 120)); System.Diagnostics.Debug.WriteLine("Truncating Email1"); } } if (!string.IsNullOrEmpty(Email2)) { if (levelStr == null) { levelStr = Util.IntToString(level); } string line = Email2.Replace("@", "@@"); sw.Write(Environment.NewLine); sw.Write(levelStr); sw.Write(" EMAIL "); if (line.Length <= 120) { sw.Write(line); } else { sw.Write(line.Substring(0, 120)); System.Diagnostics.Debug.WriteLine("Truncating Email2"); } } if (!string.IsNullOrEmpty(Email3)) { if (levelStr == null) { levelStr = Util.IntToString(level); } string line = Email3.Replace("@", "@@"); sw.Write(Environment.NewLine); sw.Write(levelStr); sw.Write(" EMAIL "); if (line.Length <= 120) { sw.Write(line); } else { sw.Write(line.Substring(0, 120)); System.Diagnostics.Debug.WriteLine("Truncating Email3"); } } if (!string.IsNullOrEmpty(Www1)) { if (levelStr == null) { levelStr = Util.IntToString(level); } string line = Www1.Replace("@", "@@"); sw.Write(Environment.NewLine); sw.Write(levelStr); sw.Write(" WWW "); if (line.Length <= 120) { sw.Write(line); } else { sw.Write(line.Substring(0, 120)); System.Diagnostics.Debug.WriteLine("Truncating Www1"); } } if (!string.IsNullOrEmpty(Www2)) { if (levelStr == null) { levelStr = Util.IntToString(level); } string line = Www2.Replace("@", "@@"); sw.Write(Environment.NewLine); sw.Write(levelStr); sw.Write(" WWW "); if (line.Length <= 120) { sw.Write(line); } else { sw.Write(line.Substring(0, 120)); System.Diagnostics.Debug.WriteLine("Truncating Www2"); } } if (!string.IsNullOrEmpty(Www3)) { if (levelStr == null) { levelStr = Util.IntToString(level); } string line = Www3.Replace("@", "@@"); sw.Write(Environment.NewLine); sw.Write(levelStr); sw.Write(" WWW "); if (line.Length <= 120) { sw.Write(line); } else { sw.Write(line.Substring(0, 120)); System.Diagnostics.Debug.WriteLine("Truncating Www3"); } } }
public override bool Collect(AbstractDataCollector <TEntity> collector) { if (collector == null) { return(false); } ActiveCollector = collector; ID = ((IPatientViewer)ActiveCollector.ActiveViewer).ID; if (ActiveDBItem == null) { return(false); } ((Person_cu)ActiveDBItem).DBCommonTransactionType = ((IPatientViewer)ActiveCollector.ActiveViewer).CommonTransactionType; if (FirstNameP != null) { ((Person_cu)ActiveDBItem).FirstName_P = FirstNameP.ToString(); } if (SecondNameP != null) { ((Person_cu)ActiveDBItem).SecondName_P = SecondNameP.ToString(); } if (ThirdNameP != null) { ((Person_cu)ActiveDBItem).ThirdName_P = ThirdNameP.ToString(); } if (FourthNameP != null) { ((Person_cu)ActiveDBItem).FourthName_P = FourthNameP.ToString(); } if (FirstNameS != null) { ((Person_cu)ActiveDBItem).FirstName_S = FirstNameS.ToString(); } if (SecondNameS != null) { ((Person_cu)ActiveDBItem).SecondName_S = SecondNameS.ToString(); } if (ThirdNameS != null) { ((Person_cu)ActiveDBItem).ThirdName_S = ThirdNameS.ToString(); } if (FourthNameS != null) { ((Person_cu)ActiveDBItem).FourthName_S = FourthNameS.ToString(); } if (PersonGender != null) { ((Person_cu)ActiveDBItem).Gender = Convert.ToBoolean(PersonGender); } if (PersonTitle != null) { ((Person_cu)ActiveDBItem).PersonTitle_P_ID = Convert.ToInt32(PersonTitle); } if (Nationality != null) { ((Person_cu)ActiveDBItem).Nationality_CU_ID = Convert.ToInt32(Nationality); } if (MaritalStatus != null) { ((Person_cu)ActiveDBItem).MaritalStatus_P_ID = Convert.ToInt32(MaritalStatus); } if (DateOfBirth != null) { ((Person_cu)ActiveDBItem).BirthDate = Convert.ToDateTime(DateOfBirth); } if (((Person_cu)ActiveDBItem).Patient_cu == null) { ((Person_cu)ActiveDBItem).Patient_cu = new Patient_cu(); } if (UserID != null) { ((Person_cu)ActiveDBItem).Patient_cu.InsertedBy = Convert.ToInt32(UserID); } if (InsuranceCarrier != null && InsuranceLevel != null) { InsuranceCarrier_InsuranceLevel_cu insuaCarrierInsuranceLevelCu = InsuranceCarrier_InsuranceLevel_cu.ItemsList.Find( item => Convert.ToInt32(item.InsuranceCarrier_CU_ID).Equals(Convert.ToInt32(InsuranceCarrier)) && Convert.ToInt32(item.InsuranceLevel_CU_ID).Equals(Convert.ToInt32(InsuranceLevel))); if (insuaCarrierInsuranceLevelCu != null) { ((Person_cu)ActiveDBItem).Patient_cu.InsuranceCarrier_InsuranceLevel_CU_ID = Convert.ToInt32(insuaCarrierInsuranceLevelCu.ID); } if (RelativeName != null) { ((Person_cu)ActiveDBItem).Patient_cu.RelativeName = RelativeName.ToString(); } if (RelativeAddress != null) { ((Person_cu)ActiveDBItem).Patient_cu.RelativeAddress = RelativeAddress.ToString(); } if (RelativePhone != null) { ((Person_cu)ActiveDBItem).Patient_cu.RelativePhone = RelativePhone.ToString(); } if (RelativeType != null) { ((Person_cu)ActiveDBItem).Patient_cu.PersonRelativeType_P_ID = Convert.ToInt32(RelativeType); } } if (CountryOfResidence != null) { ((Person_cu)ActiveDBItem).CountryOfResidence_CU_ID = Convert.ToInt32(CountryOfResidence); } if (City != null) { ((Person_cu)ActiveDBItem).CityOfResidence_CU_ID = Convert.ToInt32(City); } if (Region != null) { ((Person_cu)ActiveDBItem).Region_CU_ID = Convert.ToInt32(Region); } if (Address != null) { ((Person_cu)ActiveDBItem).Address = Address.ToString(); } if (Phone1 != null) { ((Person_cu)ActiveDBItem).Phone1 = Phone1.ToString(); } if (Phone2 != null) { ((Person_cu)ActiveDBItem).Phone2 = Phone2.ToString(); } if (Mobile1 != null) { ((Person_cu)ActiveDBItem).Mobile1 = Mobile1.ToString(); } if (Mobile2 != null) { ((Person_cu)ActiveDBItem).Mobile2 = Mobile2.ToString(); } if (Email != null) { ((Person_cu)ActiveDBItem).Mobile2 = Email.ToString(); } if (Email != null) { ((Person_cu)ActiveDBItem).Mobile2 = Email.ToString(); } if (IdentificationCardType != null) { ((Person_cu)ActiveDBItem).IdentificationCardType_P_ID = Convert.ToInt32(IdentificationCardType); } if (IdentificationCardNumber != null) { ((Person_cu)ActiveDBItem).IdentificationCardNumber = IdentificationCardNumber.ToString(); } if (IdentificationCardIssuingDate != null) { ((Person_cu)ActiveDBItem).IdentificationCardIssuingDate = Convert.ToDateTime(IdentificationCardIssuingDate); } if (IdentificationCardEpirationDate != null) { ((Person_cu)ActiveDBItem).IdentificationCardExpirationDate = Convert.ToDateTime(IdentificationCardEpirationDate); } ((Person_cu)ActiveDBItem).IsOnDuty = true; switch (CommonTransactionType) { case DB_CommonTransactionType.DeleteExisting: ((Person_cu)ActiveDBItem).IsOnDuty = false; break; } RelatedViewers = ((IPatientViewer)ActiveCollector.ActiveViewer).RelatedViewers; return(true); }