private void butQuest_Click(object sender, EventArgs e) { FormPat form = new FormPat(); form.PatNum = PatCur.PatNum; form.FormDateTime = DateTime.Now; FormFormPatEdit FormP = new FormFormPatEdit(); FormP.FormPatCur = form; FormP.IsNew = true; FormP.ShowDialog(); if (FormP.DialogResult == DialogResult.OK) { DialogResult = DialogResult.OK; } }
private void gridProg_CellDoubleClick(object sender,ODGridClickEventArgs e) { Chartscrollval=gridProg.ScrollValue; DataRow row=(DataRow)gridProg.Rows[e.Row].Tag; if(row["ProcNum"].ToString()!="0"){ if(checkAudit.Checked){ MsgBox.Show(this,"Not allowed to edit procedures when in audit mode."); return; } Procedure proc=Procedures.GetOneProc(PIn.Long(row["ProcNum"].ToString()),true); if(ProcedureCodes.GetStringProcCode(proc.CodeNum)==ProcedureCodes.GroupProcCode){ FormProcGroup FormP=new FormProcGroup(); List<ProcGroupItem> groupItemList=ProcGroupItems.GetForGroup(proc.ProcNum); List<Procedure> procList=new List<Procedure>(); for(int i=0;i<groupItemList.Count;i++){ procList.Add(Procedures.GetOneProc(groupItemList[i].ProcNum,false)); } FormP.GroupCur=proc; FormP.GroupItemList=groupItemList; FormP.ProcList=procList; FormP.ShowDialog(); if(FormP.DialogResult==DialogResult.OK){ ModuleSelected(PatCur.PatNum); FillProgNotes(); } return; } else{ FormProcEdit FormP=new FormProcEdit(proc,PatCur,FamCur); Plugins.HookAddCode(this, "ContrChart.gridProg_CellDoubleClick_proc", proc, FormP); if(!FormP.IsDisposed) { //Form might be disposed by the above hook. FormP.ShowDialog(); } Plugins.HookAddCode(this, "ContrChart.gridProg_CellDoubleClick_proc2", proc, FormP); if(FormP.DialogResult!=DialogResult.OK) { return; } } } else if(row["CommlogNum"].ToString()!="0"){ Commlog comm=Commlogs.GetOne(PIn.Long(row["CommlogNum"].ToString())); FormCommItem FormC=new FormCommItem(comm); FormC.ShowDialog(); if(FormC.DialogResult!=DialogResult.OK){ return; } } else if(row["RxNum"].ToString()!="0") { RxPat rx=RxPats.GetRx(PIn.Long(row["RxNum"].ToString())); FormRxEdit FormRxE=new FormRxEdit(PatCur,rx); FormRxE.ShowDialog(); if(FormRxE.DialogResult!=DialogResult.OK){ return; } } else if(row["LabCaseNum"].ToString()!="0") { LabCase lab=LabCases.GetOne(PIn.Long(row["LabCaseNum"].ToString())); FormLabCaseEdit FormL=new FormLabCaseEdit(); FormL.CaseCur=lab; FormL.ShowDialog(); //needs to always refresh due to complex ok/cancel } else if(row["TaskNum"].ToString()!="0") { Task task=Tasks.GetOne(PIn.Long(row["TaskNum"].ToString())); if(task==null) { MsgBox.Show(this,"This task has been deleted by another user."); } else { FormTaskEdit FormT=new FormTaskEdit(task,task.Copy()); FormT.Closing+=new CancelEventHandler(TaskGoToEvent); FormT.Show();//non-modal } } else if(row["AptNum"].ToString()!="0") { //Appointment apt=Appointments.GetOneApt( FormApptEdit FormA=new FormApptEdit(PIn.Long(row["AptNum"].ToString())); //PinIsVisible=false FormA.IsInChartModule=true; FormA.ShowDialog(); if(FormA.CloseOD) { ((Form)this.Parent).Close(); return; } if(FormA.DialogResult!=DialogResult.OK) { return; } } else if(row["EmailMessageNum"].ToString()!="0") { EmailMessage msg=EmailMessages.GetOne(PIn.Long(row["EmailMessageNum"].ToString())); if(msg.SentOrReceived==EmailSentOrReceived.WebMailReceived || msg.SentOrReceived==EmailSentOrReceived.WebMailRecdRead || msg.SentOrReceived==EmailSentOrReceived.WebMailSent || msg.SentOrReceived==EmailSentOrReceived.WebMailSentRead) { //web mail uses special secure messaging portal FormWebMailMessageEdit FormWMME=new FormWebMailMessageEdit(PatCur.PatNum,msg.EmailMessageNum); if(FormWMME.ShowDialog()!=DialogResult.OK) { return; } } else { FormEmailMessageEdit FormE=new FormEmailMessageEdit(msg); FormE.ShowDialog(); if(FormE.DialogResult!=DialogResult.OK) { return; } } } else if(row["SheetNum"].ToString()!="0") { Sheet sheet=Sheets.GetSheet(PIn.Long(row["SheetNum"].ToString())); FormSheetFillEdit FormSFE=new FormSheetFillEdit(sheet); FormSFE.ShowDialog(); if(FormSFE.DialogResult!=DialogResult.OK) { return; } } else if(row["FormPatNum"].ToString()!="0"){ FormPat form=FormPats.GetOne(PIn.Long(row["FormPatNum"].ToString())); FormFormPatEdit FormP=new FormFormPatEdit(); FormP.FormPatCur=form; FormP.ShowDialog(); if(FormP.DialogResult==DialogResult.OK) { ModuleSelected(PatCur.PatNum);//Why is this called here and down 3 lines? Do we need the Allocator, or should we return here? } } ModuleSelected(PatCur.PatNum); Reporting.Allocators.MyAllocator1_ProviderPayment.AllocateWithToolCheck(this.PatCur.Guarantor); }
private void gridComm_CellDoubleClick(object sender,OpenDental.UI.ODGridClickEventArgs e) { //TODO: transition this to checking the Tag object. int row=e.Row; if(!this.checkShowFamilyComm.Checked) {//if only showing entries for one patient instead of intermingled family entries int i; for(row=0,i=0;row<DataSetMain.Tables["Commlog"].Rows.Count;row++) { //Matching FName is not perfect because children can have the same names as parents. //But it does currently match the logic for display, so it will at least select the right row when double clicked. if(DataSetMain.Tables["Commlog"].Rows[row]["patName"].ToString()==PatCur.FName || DataSetMain.Tables["Commlog"].Rows[row]["patName"].ToString()=="") { if(i==e.Row) { break; } i++; } } } if(DataSetMain.Tables["Commlog"].Rows[row]["CommlogNum"].ToString()!="0") { Commlog CommlogCur= Commlogs.GetOne(PIn.Long(DataSetMain.Tables["Commlog"].Rows[row]["CommlogNum"].ToString())); FormCommItem FormCI=new FormCommItem(CommlogCur); FormCI.ShowDialog(); if(FormCI.DialogResult==DialogResult.OK) { ModuleSelected(PatCur.PatNum); } } else if(DataSetMain.Tables["Commlog"].Rows[row]["EmailMessageNum"].ToString()!="0") { EmailMessage email= EmailMessages.GetOne(PIn.Long(DataSetMain.Tables["Commlog"].Rows[row]["EmailMessageNum"].ToString())); FormEmailMessageEdit FormE=new FormEmailMessageEdit(email); FormE.ShowDialog(); if(FormE.DialogResult==DialogResult.OK) { ModuleSelected(PatCur.PatNum); } } else if(DataSetMain.Tables["Commlog"].Rows[row]["FormPatNum"].ToString()!="0") { FormPat form=FormPats.GetOne(PIn.Long(DataSetMain.Tables["Commlog"].Rows[row]["FormPatNum"].ToString())); FormFormPatEdit FormP=new FormFormPatEdit(); FormP.FormPatCur=form; FormP.ShowDialog(); if(FormP.DialogResult==DialogResult.OK) { ModuleSelected(PatCur.PatNum); } } else if(DataSetMain.Tables["Commlog"].Rows[row]["SheetNum"].ToString()!="0") { Sheet sheet=Sheets.GetSheet(PIn.Long(DataSetMain.Tables["Commlog"].Rows[row]["SheetNum"].ToString())); FormSheetFillEdit FormSFE=new FormSheetFillEdit(sheet); FormSFE.ShowDialog(); if(FormSFE.DialogResult==DialogResult.OK) { ModuleSelected(PatCur.PatNum); } } }
private void butComm_Click(object sender, System.EventArgs e) { FormPat form=new FormPat(); form.PatNum=PatCur.PatNum; form.FormDateTime=DateTime.Now; FormFormPatEdit FormP=new FormFormPatEdit(); FormP.FormPatCur=form; FormP.IsNew=true; FormP.ShowDialog(); if(FormP.DialogResult==DialogResult.OK) { ModuleSelected(PatCur.PatNum); } }
private void gridComm_CellDoubleClick(object sender,OpenDental.UI.ODGridClickEventArgs e) { int row=(int)gridComm.Rows[e.Row].Tag; if(DataSetMain.Tables["Commlog"].Rows[row]["CommlogNum"].ToString()!="0") { Commlog CommlogCur= Commlogs.GetOne(PIn.Long(DataSetMain.Tables["Commlog"].Rows[row]["CommlogNum"].ToString())); FormCommItem FormCI=new FormCommItem(CommlogCur); FormCI.ShowDialog(); if(FormCI.DialogResult==DialogResult.OK) { ModuleSelected(PatCur.PatNum); } } else if(DataSetMain.Tables["Commlog"].Rows[row]["EmailMessageNum"].ToString()!="0") { EmailMessage email= EmailMessages.GetOne(PIn.Long(DataSetMain.Tables["Commlog"].Rows[row]["EmailMessageNum"].ToString())); if(email.SentOrReceived==EmailSentOrReceived.WebMailReceived || email.SentOrReceived==EmailSentOrReceived.WebMailRecdRead || email.SentOrReceived==EmailSentOrReceived.WebMailSent || email.SentOrReceived==EmailSentOrReceived.WebMailSentRead) { //web mail uses special secure messaging portal FormWebMailMessageEdit FormWMME=new FormWebMailMessageEdit(PatCur.PatNum,email.EmailMessageNum); if(FormWMME.ShowDialog()==DialogResult.OK) { ModuleSelected(PatCur.PatNum); } } else { FormEmailMessageEdit FormE=new FormEmailMessageEdit(email); FormE.ShowDialog(); if(FormE.DialogResult==DialogResult.OK) { ModuleSelected(PatCur.PatNum); } } } else if(DataSetMain.Tables["Commlog"].Rows[row]["FormPatNum"].ToString()!="0") { FormPat form=FormPats.GetOne(PIn.Long(DataSetMain.Tables["Commlog"].Rows[row]["FormPatNum"].ToString())); FormFormPatEdit FormP=new FormFormPatEdit(); FormP.FormPatCur=form; FormP.ShowDialog(); if(FormP.DialogResult==DialogResult.OK) { ModuleSelected(PatCur.PatNum); } } else if(DataSetMain.Tables["Commlog"].Rows[row]["SheetNum"].ToString()!="0") { Sheet sheet=Sheets.GetSheet(PIn.Long(DataSetMain.Tables["Commlog"].Rows[row]["SheetNum"].ToString())); FormSheetFillEdit FormSFE=new FormSheetFillEdit(sheet); FormSFE.ShowDialog(); if(FormSFE.DialogResult==DialogResult.OK) { ModuleSelected(PatCur.PatNum); } } }
private void toolBarButComm_Click() { FormPat form=new FormPat(); form.PatNum=PatCur.PatNum; form.FormDateTime=DateTime.Now; FormFormPatEdit FormP=new FormFormPatEdit(); FormP.FormPatCur=form; FormP.IsNew=true; FormP.ShowDialog(); if(FormP.DialogResult==DialogResult.OK) { ModuleSelected(PatCur.PatNum); } }