Ejemplo n.º 1
0
		private void butBilling_Click(object sender,System.EventArgs e) {
			if(!Security.IsAuthorized(Permissions.Billing)) {
				return;
			}
			bool unsentStatementsExist=Statements.UnsentStatementsExist();
			if(unsentStatementsExist) {
				if(!PrefC.GetBool(PrefName.EasyNoClinics)) {//Using clinics.
					//Have user choose which clinic they want to see billing for.
					FormBillingClinic FormBC=new FormBillingClinic();
					FormBC.ClinicNum=FormOpenDental.ClinicNum;
					FormBC.ShowDialog();
					if(FormBC.DialogResult==DialogResult.OK) {
						if(Statements.UnsentClinicStatementsExist(FormBC.ClinicNum)) {//Check if clinic has unsent bills.
							ShowBilling(FormBC.ClinicNum);//Clinic has unsent bills.  Simply show billing window.
						}
						else {//No unsent bills for clinic.  Show billing options to generate a billing list.
							ShowBillingOptions(FormBC.ClinicNum);
						}
					}
					else {//User clicked the X on FormBillingClinic
						return;//Do not create a security log when billing wasn't actually shown.
					}
				}
				else {//Not using clinics and has unsent bills.  Simply show billing window.
					ShowBilling(0);
				}
			}
			else {//No unsent statements exist.  Have user create a billing list.
				ShowBillingOptions(0);
			}
			SecurityLogs.MakeLogEntry(Permissions.Billing,0,"");
		}
Ejemplo n.º 2
0
 private void butBilling_Click(object sender,System.EventArgs e)
 {
     bool unsentStatementsExist=Statements.UnsentStatementsExist();
     if(unsentStatementsExist) {
         if(!PrefC.GetBool(PrefName.EasyNoClinics)) {//Using clinics.
             //Have user choose which clinic they want to see billing for.
             FormBillingClinic FormBC=new FormBillingClinic();
             FormBC.ShowDialog();
             if(FormBC.DialogResult==DialogResult.OK) {
                 if(Statements.UnsentClinicStatementsExist(FormBC.ClinicNum)) {//Check if clinic has unsent bills.
                     ShowBilling(FormBC.ClinicNum);//Clinic has unsent bills.  Simply show billing window.
                 }
                 else {//No unsent bills for clinic.  Show billing options to generate a billing list.
                     ShowBillingOptions(FormBC.ClinicNum);
                 }
             }
         }
         else {//Not using clinics and has unsent bills.  Simply show billing window.
             ShowBilling(0);
         }
     }
     else {//No unsent statements exist.  Have user create a billing list.
         ShowBillingOptions(0);
     }
     SecurityLogs.MakeLogEntry(Permissions.Setup,0,"Billing");
 }