コード例 #1
0
ファイル: FormPayPlan.cs プロジェクト: nampn/ODental
 private void butAdd_Click(object sender, System.EventArgs e)
 {
     PayPlanCharge ppCharge=new PayPlanCharge();
     ppCharge.PayPlanNum=PayPlanCur.PayPlanNum;
     ppCharge.Guarantor=PayPlanCur.Guarantor;
     ppCharge.ChargeDate=DateTime.Today;
     ppCharge.ProvNum=PatCur.PriProv;//will be changed at the end.
     ppCharge.ClinicNum=PatCur.ClinicNum;//will be changed at the end.
     FormPayPlanChargeEdit FormP=new FormPayPlanChargeEdit(ppCharge);
     FormP.IsNew=true;
     FormP.ShowDialog();
     if(FormP.DialogResult==DialogResult.Cancel){
         return;
     }
     FillCharges();
 }
コード例 #2
0
ファイル: FormPayPlan.cs プロジェクト: nampn/ODental
 private void gridCharges_CellDoubleClick(object sender, OpenDental.UI.ODGridClickEventArgs e)
 {
     if(table.Rows[e.Row]["PayPlanChargeNum"].ToString()!="0"){
         PayPlanCharge charge=PayPlanCharges.GetOne(PIn.Long(table.Rows[e.Row]["PayPlanChargeNum"].ToString()));
         FormPayPlanChargeEdit FormP=new FormPayPlanChargeEdit(charge);
         FormP.ShowDialog();
         if(FormP.DialogResult==DialogResult.Cancel){
             return;
         }
     }
     else if(table.Rows[e.Row]["PayNum"].ToString()!="0"){
         Payment pay=Payments.GetPayment(PIn.Long(table.Rows[e.Row]["PayNum"].ToString()));
         /*if(pay.PayType==0){//provider income transfer. I don't think this is possible, but you never know.
             FormProviderIncTrans FormPIT=new FormProviderIncTrans();
             FormPIT.PatNum=PatCur.PatNum;
             FormPIT.PaymentCur=pay;
             FormPIT.IsNew=false;
             FormPIT.ShowDialog();
             if(FormPIT.DialogResult==DialogResult.Cancel){
                 return;
             }
         }
         else{*/
         FormPayment FormPayment2=new FormPayment(PatCur,FamCur,pay);
         FormPayment2.IsNew=false;
         FormPayment2.ShowDialog();
         if(FormPayment2.DialogResult==DialogResult.Cancel){
             return;
         }
         //}
     }
     FillCharges();
 }
コード例 #3
0
ファイル: FormPayPlan.cs プロジェクト: mnisl/OD
		private void gridCharges_CellDoubleClick(object sender, OpenDental.UI.ODGridClickEventArgs e) {
			if(gridCharges.Rows[e.Row].Tag==null) {//Prevent double clicking on the "Current Totals" row
				return;
			}
			if(gridCharges.Rows[e.Row].Tag.GetType()==typeof(PayPlanCharge)){
				PayPlanCharge payPlanCharge=(PayPlanCharge)gridCharges.Rows[e.Row].Tag;
				FormPayPlanChargeEdit FormP=new FormPayPlanChargeEdit(payPlanCharge);//This automatically takes care of our in-memory list because the Tag is referencing our list of objects.
				FormP.ShowDialog();
				if(FormP.DialogResult==DialogResult.Cancel){
					return;
				}
				if(FormP.PayPlanChargeCur==null) {//The user deleted the payplancharge.
					_listPayPlanCharges.Remove(payPlanCharge);//We know the payPlanCharge object is inside _listPayPlanCharges.
					gridCharges.BeginUpdate();
					gridCharges.Rows.RemoveAt(e.Row);
					gridCharges.EndUpdate();
					return;
				}
			}
			else if(gridCharges.Rows[e.Row].Tag.GetType()==typeof(PaySplit)){
				PaySplit paySplit=(PaySplit)gridCharges.Rows[e.Row].Tag;
				FormPayment FormPayment2=new FormPayment(PatCur,FamCur,Payments.GetPayment(paySplit.PayNum));//FormPayment may inserts and/or update the paysplits. 
				FormPayment2.IsNew=false;
				FormPayment2.ShowDialog();
				if(FormPayment2.DialogResult==DialogResult.Cancel){
					return;
				}
			}
			else if(gridCharges.Rows[e.Row].Tag.GetType()==typeof(DataRow)){//Claim payment or bundle.
				DataRow bundledClaimProc=(DataRow)gridCharges.Rows[e.Row].Tag;
				Claim claimCur=Claims.GetClaim(PIn.Long(bundledClaimProc["ClaimNum"].ToString()));
				FormClaimEdit FormCE=new FormClaimEdit(claimCur,PatCur,FamCur);//FormClaimEdit inserts and/or updates the claim and/or claimprocs, which could potentially change the bundle.
				FormCE.IsNew=false;
				FormCE.ShowDialog();
				//Cancel from FormClaimEdit does not cancel payment edits, fill grid every time
			}
			FillCharges();
		}