private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e){ InsPlan plan=InsPlans.GetPlan(PIn.Long(table.Rows[e.Row]["PlanNum"].ToString()),null); if(IsSelectMode) { SelectedPlan=plan.Copy(); DialogResult=DialogResult.OK; return; } FormInsPlan FormIP=new FormInsPlan(plan,null,null); FormIP.ShowDialog(); if(FormIP.DialogResult!=DialogResult.OK) { return; } FillGrid(); }
private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e) { InsPlan plan=InsPlans.GetPlan(SubList[e.Row].PlanNum,PlanList); FormInsPlan FormIP=new FormInsPlan(plan,null,SubList[e.Row]); FormIP.ShowDialog(); FillGrid(); }
private void gridIns_CellDoubleClick(object sender, OpenDental.UI.ODGridClickEventArgs e) { if(e.Col==0){ return; } Cursor=Cursors.WaitCursor; PatPlan patPlan=PatPlanList[e.Col-1]; InsSub insSub=InsSubs.GetSub(patPlan.InsSubNum,SubList); PlanList=InsPlans.RefreshForSubList(SubList);//this is only here in case, if in FormModuleSetup, the InsDefaultCobRule is changed and cob changed for all plans. InsPlan insPlan=InsPlans.GetPlan(insSub.PlanNum,PlanList); FormInsPlan FormIP=new FormInsPlan(insPlan,patPlan,insSub); FormIP.ShowDialog(); Cursor=Cursors.Default; ModuleSelected(PatCur.PatNum); }
private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e){ InsPlan PlanCur=ListAll[e.Row].Copy(); FormInsPlan FormIP=new FormInsPlan(PlanCur,null,null); //FormIP.IsForAll=true; //FormIP.IsReadOnly=true; FormIP.ShowDialog(); if(FormIP.DialogResult==DialogResult.OK) { FillGrid(); } }
private void ToolButIns_Click(){ DialogResult result=MessageBox.Show(Lan.g(this,"Is this patient the subscriber?"),"",MessageBoxButtons.YesNoCancel); if(result==DialogResult.Cancel){ return; } //Pick a subscriber------------------------------------------------------------------------------------------------ Patient subscriber; if(result==DialogResult.Yes){//current patient is subscriber subscriber=PatCur.Copy(); } else{//patient is not subscriber //show list of patients in this family FormSubscriberSelect FormS=new FormSubscriberSelect(FamCur); FormS.ShowDialog(); if(FormS.DialogResult==DialogResult.Cancel){ return; } subscriber=Patients.GetPat(FormS.SelectedPatNum); } //Subscriber has been chosen. Now, pick a plan------------------------------------------------------------------- InsPlan plan=null; InsSub sub=null; bool planIsNew=false; List<InsSub> subList=InsSubs.GetListForSubscriber(subscriber.PatNum); if(subList.Count==0){ planIsNew=true; } else{ FormInsSelectSubscr FormISS=new FormInsSelectSubscr(subscriber.PatNum); FormISS.ShowDialog(); if(FormISS.DialogResult==DialogResult.Cancel) { return; } if(FormISS.SelectedInsSubNum==0){//'New' option selected. planIsNew=true; } else{ sub=InsSubs.GetSub(FormISS.SelectedInsSubNum,subList); plan=InsPlans.GetPlan(sub.PlanNum,new List<InsPlan>()); } } //New plan was selected instead of an existing plan. Create the plan-------------------------------------------- if(planIsNew){ plan=new InsPlan(); plan.EmployerNum=subscriber.EmployerNum; plan.PlanType=""; InsPlans.Insert(plan); sub=new InsSub(); sub.PlanNum=plan.PlanNum; sub.Subscriber=subscriber.PatNum; if(subscriber.MedicaidID==""){ sub.SubscriberID=subscriber.SSN; } else{ sub.SubscriberID=subscriber.MedicaidID; } sub.ReleaseInfo=true; sub.AssignBen=true; InsSubs.Insert(sub); Benefit ben; for(int i=0;i<CovCatC.ListShort.Count;i++){ if(CovCatC.ListShort[i].DefaultPercent==-1){ continue; } ben=new Benefit(); ben.BenefitType=InsBenefitType.CoInsurance; ben.CovCatNum=CovCatC.ListShort[i].CovCatNum; ben.PlanNum=plan.PlanNum; ben.Percent=CovCatC.ListShort[i].DefaultPercent; ben.TimePeriod=BenefitTimePeriod.CalendarYear; ben.CodeNum=0; Benefits.Insert(ben); } //Zero deductible diagnostic if(CovCats.GetForEbenCat(EbenefitCategory.Diagnostic)!=null) { ben=new Benefit(); ben.CodeNum=0; ben.BenefitType=InsBenefitType.Deductible; ben.CovCatNum=CovCats.GetForEbenCat(EbenefitCategory.Diagnostic).CovCatNum; ben.PlanNum=plan.PlanNum; ben.TimePeriod=BenefitTimePeriod.CalendarYear; ben.MonetaryAmt=0; ben.Percent=-1; ben.CoverageLevel=BenefitCoverageLevel.Individual; Benefits.Insert(ben); } //Zero deductible preventive if(CovCats.GetForEbenCat(EbenefitCategory.RoutinePreventive)!=null) { ben=new Benefit(); ben.CodeNum=0; ben.BenefitType=InsBenefitType.Deductible; ben.CovCatNum=CovCats.GetForEbenCat(EbenefitCategory.RoutinePreventive).CovCatNum; ben.PlanNum=plan.PlanNum; ben.TimePeriod=BenefitTimePeriod.CalendarYear; ben.MonetaryAmt=0; ben.Percent=-1; ben.CoverageLevel=BenefitCoverageLevel.Individual; Benefits.Insert(ben); } } //Then attach plan------------------------------------------------------------------------------------------------ PatPlan patplan=new PatPlan(); patplan.Ordinal=(byte)(PatPlanList.Count+1);//so the ordinal of the first entry will be 1, NOT 0. patplan.PatNum=PatCur.PatNum; patplan.InsSubNum=sub.InsSubNum; patplan.Relationship=Relat.Self; PatPlans.Insert(patplan); //Then, display insPlanEdit to user------------------------------------------------------------------------------- FormInsPlan FormI=new FormInsPlan(plan,patplan,sub); FormI.IsNewPlan=planIsNew; FormI.IsNewPatPlan=true; FormI.ShowDialog();//this updates estimates also. //if cancel, then patplan is deleted from within that dialog. //if cancel, and planIsNew, then plan and benefits are also deleted. ModuleSelected(PatCur.PatNum); }