private void TxtIDocID_TargetUpdated(object sender, DataTransferEventArgs e) { TextBox txtbox = sender as TextBox; long iDocID; long.TryParse(txtbox.Text.ToString(), out iDocID); if (iDocID > 0) { // find the doc dhDoctorView objDoc = this.MyBlDoctor.DoctorList.Where(d => d.IDocid == iDocID).FirstOrDefault(); // bind the information if (objDoc != null) { this.DoctorInformationGrid.DataContext = objDoc; ((dhAppointment)this.AppointmentInfo.DataContext).IDocid = objDoc.IDocid; ((dhAppointment)this.AppointmentInfo.DataContext).IPayment_Due = objDoc.IPatient_Fee; } } }
private void DocList_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (sender != null) { DataGridRow dgr = sender as DataGridRow; // get the obect and then Invoice ID opne the Id in readonly mode dhDoctors objTodisplay = new dhDoctors(); // need to update to docview // first get view object then create new doctore obj dhDoctorView objtemp = ((dhDoctorView)dgr.Item); objTodisplay = this.MyViewModel.db.Doctors.Find(objtemp.IDocid); if (objTodisplay != null) { objTodisplay.IUpdate = 1; AddDoctorsViewModel ObjSetToEdit = new AddDoctorsViewModel(objTodisplay); //objvm.SelectToEdit(new AddPartyViewModel(objTodisplay)); Globalized.LoadThisObject(ObjSetToEdit, "Edit Doctor '" + objTodisplay.VfName + " " + objTodisplay.VlName + "'", Globalized.AppModuleList.Where(xx => xx.VModuleName == "Doctors").FirstOrDefault().VShortDescription); } } }