private void toolBarButInstallPlan_Click() {
			if(InstallmentPlans.GetOneForFam(PatCur.Guarantor)!=null) {
				MsgBox.Show(this,"Family already has an installment plan.");
				return;
			}
			InstallmentPlan installPlan=new InstallmentPlan();
			installPlan.PatNum=PatCur.Guarantor;
			installPlan.DateAgreement=DateTime.Today;
			installPlan.DateFirstPayment=DateTime.Today;
			//InstallmentPlans.Insert(installPlan);
			FormInstallmentPlanEdit FormIPE=new FormInstallmentPlanEdit();
			FormIPE.InstallmentPlanCur=installPlan;
			FormIPE.IsNew=true;
			FormIPE.ShowDialog();
			ModuleSelected(PatCur.PatNum);
		}
		private void gridPayPlan_CellDoubleClick(object sender,ODGridClickEventArgs e) {
			DataTable table=DataSetMain.Tables["payplan"];
			if(table.Rows[e.Row]["PayPlanNum"].ToString()!="0") {//Payment plan
				PayPlan payplan=PayPlans.GetOne(PIn.Long(table.Rows[e.Row]["PayPlanNum"].ToString()));
				FormPayPlan2=new FormPayPlan(PatCur,payplan);
				FormPayPlan2.ShowDialog();
				if(FormPayPlan2.GotoPatNum!=0) {
					ModuleSelected(FormPayPlan2.GotoPatNum,false);
					return;
				}
				bool isSelectingFamily=gridAcctPat.GetSelectedIndex()==this.DataSetMain.Tables["patient"].Rows.Count-1;
				ModuleSelected(PatCur.PatNum,isSelectingFamily);
			}
			else {//Installment Plan
				FormInstallmentPlanEdit FormIPE= new FormInstallmentPlanEdit();
				FormIPE.InstallmentPlanCur = InstallmentPlans.GetOne(PIn.Long(table.Rows[e.Row]["InstallmentPlanNum"].ToString()));
				FormIPE.IsNew=false;
				FormIPE.ShowDialog();
				ModuleSelected(PatCur.PatNum);
			}
		}