context: using System;
  using System.Data;
  using System.Drawing;
  using System.Collections;
  using System.ComponentModel;
  using System.Windows.Forms;
  using OpenDentBusiness;
  using OpenDental.ReportingComplex;
  using System.Collections.Generic;
  
  namespace OpenDental{
  ///<summary></summary>
  	public class FormRpPaySheet : System.Windows.Forms.Form{
  		private OpenDental.UI.Button butCancel;
  		private OpenDental.UI.Button butOK;
  		private System.Windows.Forms.MonthCalendar date2;
  		private System.Windows.Forms.MonthCalendar date1;
  		private System.Windows.Forms.Label labelTO;
  		private System.ComponentModel.Container components = null;
  		private ListBox listProv;
  		private Label label1;
  		private GroupBox groupBox1;
  		private RadioButton radioPatient;
  		private RadioButton radioCheck;
  		private CheckBox checkPatientTypes;
  		private ListBox listPatientTypes;
  		private CheckBox checkInsuranceTypes;
  		private CheckBox checkAllClin;
  		private ListBox listClin;
  		private Label labelClin;
  		private Label labelSplits;
  		private ListBox listInsuranceTypes;
  		private CheckBox checkAllProv;
  		private List<Clinic> _listClinics;
  
  		///<summary></summary>
  		public FormRpPaySheet(){
  			InitializeComponent();
   			Lan.F(this);
  		}
  
  		///<summary></summary>
  		protected override void Dispose( bool disposing ){
  			if( disposing ){
  				if(components != null){
  					components.Dispose();
  				}
  			}
  			base.Dispose( disposing );
  		}
  
  		#region Windows Form Designer generated code
  		/// <summary>
  		/// Required method for Designer support - do not modify
  		/// the contents of this method with the code editor.
  		/// </summary>
  		private void InitializeComponent()
  		{
  			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormRpPaySheet));
  			this.date2 = new System.Windows.Forms.MonthCalendar();
  			this.date1 = new System.Windows.Forms.MonthCalendar();
  			this.labelTO = new System.Windows.Forms.Label();
  			this.listProv = new System.Windows.Forms.ListBox();
  			this.label1 = new System.Windows.Forms.Label();
  			this.checkAllProv = new System.Windows.Forms.CheckBox();
  			this.groupBox1 = new System.Windows.Forms.GroupBox();
  			this.labelSplits = new System.Windows.Forms.Label();
  			this.radioPatient = new System.Windows.Forms.RadioButton();
  			this.radioCheck = new System.Windows.Forms.RadioButton();
  			this.checkPatientTypes = new System.Windows.Forms.CheckBox();
  			this.listPatientTypes = new System.Windows.Forms.ListBox();
  			this.checkInsuranceTypes = new System.Windows.Forms.CheckBox();
  			this.checkAllClin = new System.Windows.Forms.CheckBox();
  			this.listClin = new System.Windows.Forms.ListBox();
  			this.labelClin = new System.Windows.Forms.Label();
  			this.butCancel = new OpenDental.UI.Button();
  			this.butOK = new OpenDental.UI.Button();
  			this.listInsuranceTypes = new System.Windows.Forms.ListBox();
  			this.groupBox1.SuspendLayout();
  			this.SuspendLayout();
  			// 
  			// date2
  			// 
  			this.date2.Location = new System.Drawing.Point(285, 36);
  			this.date2.Name = "date2";
  			this.date2.TabIndex = 2;
  			// 
  			// date1
  			// 
  			this.date1.Location = new System.Drawing.Point(31, 36);
  			this.date1.Name = "date1";
  			this.date1.TabIndex = 1;
  			// 
  			// labelTO
  			// 
  			this.labelTO.Location = new System.Drawing.Point(212, 44);
  			this.labelTO.Name = "labelTO";
  			this.labelTO.Size = new System.Drawing.Size(72, 23);
  			this.labelTO.TabIndex = 22;
  			this.labelTO.Text = "TO";
  			this.labelTO.TextAlign = System.Drawing.ContentAlignment.TopCenter;
  			// 
  			// listProv
  			// 
  			this.listProv.Location = new System.Drawing.Point(524, 54);
  			this.listProv.Name = "listProv";
  			this.listProv.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
  			this.listProv.Size = new System.Drawing.Size(163, 199);
  			this.listProv.TabIndex = 36;
  			this.listProv.Click += new System.EventHandler(this.listProv_Click);
  			// 
  			// label1
  			// 
  			this.label1.Location = new System.Drawing.Point(522, 15);
  			this.label1.Name = "label1";
  			this.label1.Size = new System.Drawing.Size(104, 16);
  			this.label1.TabIndex = 35;
  			this.label1.Text = "Providers";
  			this.label1.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
  			// 
  			// checkAllProv
  			// 
  			this.checkAllProv.Checked = true;
  			this.checkAllProv.CheckState = System.Windows.Forms.CheckState.Checked;
  			this.checkAllProv.FlatStyle = System.Windows.Forms.FlatStyle.System;
  			this.checkAllProv.Location = new System.Drawing.Point(525, 34);
  			this.checkAllProv.Name = "checkAllProv";
  			this.checkAllProv.Size = new System.Drawing.Size(95, 16);
  			this.checkAllProv.TabIndex = 43;
  			this.checkAllProv.Text = "All";
  			this.checkAllProv.Click += new System.EventHandler(this.checkAllProv_Click);
  			// 
  			// groupBox1
  			// 
  			this.groupBox1.Controls.Add(this.labelSplits);
  			this.groupBox1.Controls.Add(this.radioPatient);
  			this.groupBox1.Controls.Add(this.radioCheck);
  			this.groupBox1.Location = new System.Drawing.Point(31, 263);
  			this.groupBox1.Name = "groupBox1";
  			this.groupBox1.Size = new System.Drawing.Size(173, 93);
  			this.groupBox1.TabIndex = 44;
  			this.groupBox1.TabStop = false;
  			this.groupBox1.Text = "Group By";
  			// 
  			// labelSplits
  			// 
  			this.labelSplits.Location = new System.Drawing.Point(5, 60);
  			this.labelSplits.Name = "labelSplits";
  			this.labelSplits.Size = new System.Drawing.Size(163, 29);
  			this.labelSplits.TabIndex = 55;
  			this.labelSplits.Text = "Either way, provider splits will still show separately.";
  			// 
  			// radioPatient
  			// 
  			this.radioPatient.Location = new System.Drawing.Point(8, 35);
  			this.radioPatient.Name = "radioPatient";
  			this.radioPatient.Size = new System.Drawing.Size(104, 18);
  			this.radioPatient.TabIndex = 1;
  			this.radioPatient.Text = "Patient";
  			this.radioPatient.UseVisualStyleBackColor = true;
  			// 
  			// radioCheck
  			// 
  			this.radioCheck.Checked = true;
  			this.radioCheck.Location = new System.Drawing.Point(8, 16);
  			this.radioCheck.Name = "radioCheck";
  			this.radioCheck.Size = new System.Drawing.Size(104, 18);
  			this.radioCheck.TabIndex = 0;
  			this.radioCheck.TabStop = true;
  			this.radioCheck.Text = "Check";
  			this.radioCheck.UseVisualStyleBackColor = true;
  			// 
  			// checkPatientTypes
  			// 
  			this.checkPatientTypes.Checked = true;
  			this.checkPatientTypes.CheckState = System.Windows.Forms.CheckState.Checked;
  			this.checkPatientTypes.FlatStyle = System.Windows.Forms.FlatStyle.System;
  			this.checkPatientTypes.Location = new System.Drawing.Point(382, 263);
  			this.checkPatientTypes.Name = "checkPatientTypes";
  			this.checkPatientTypes.Size = new System.Drawing.Size(166, 16);
  			this.checkPatientTypes.TabIndex = 47;
  			this.checkPatientTypes.Text = "All patient payment types";
  			this.checkPatientTypes.Click += new System.EventHandler(this.checkAllTypes_Click);
  			// 
  			// listPatientTypes
  			// 
  			this.listPatientTypes.Location = new System.Drawing.Point(382, 285);
  			this.listPatientTypes.Name = "listPatientTypes";
  			this.listPatientTypes.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
  			this.listPatientTypes.Size = new System.Drawing.Size(163, 186);
  			this.listPatientTypes.TabIndex = 46;
  			// 
  			// checkInsuranceTypes
  			// 
  			this.checkInsuranceTypes.Checked = true;
  			this.checkInsuranceTypes.CheckState = System.Windows.Forms.CheckState.Checked;
  			this.checkInsuranceTypes.FlatStyle = System.Windows.Forms.FlatStyle.System;
  			this.checkInsuranceTypes.Location = new System.Drawing.Point(210, 263);
  			this.checkInsuranceTypes.Name = "checkInsuranceTypes";
  			this.checkInsuranceTypes.Size = new System.Drawing.Size(166, 16);
  			this.checkInsuranceTypes.TabIndex = 48;
  			this.checkInsuranceTypes.Text = "All insurance payment types";
  			this.checkInsuranceTypes.Click += new System.EventHandler(this.checkIns_Click);
  			// 
  			// checkAllClin
  			// 
  			this.checkAllClin.FlatStyle = System.Windows.Forms.FlatStyle.System;
  			this.checkAllClin.Location = new System.Drawing.Point(554, 305);
  			this.checkAllClin.Name = "checkAllClin";
  			this.checkAllClin.Size = new System.Drawing.Size(95, 16);
  			this.checkAllClin.TabIndex = 54;
  			this.checkAllClin.Text = "All";
  			this.checkAllClin.Click += new System.EventHandler(this.checkAllClin_Click);
  			// 
  			// listClin
  			// 
  			this.listClin.Location = new System.Drawing.Point(554, 324);
  			this.listClin.Name = "listClin";
  			this.listClin.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
  			this.listClin.Size = new System.Drawing.Size(154, 147);
  			this.listClin.TabIndex = 53;
  			this.listClin.Click += new System.EventHandler(this.listClin_Click);
  			// 
  			// labelClin
  			// 
  			this.labelClin.Location = new System.Drawing.Point(551, 287);
  			this.labelClin.Name = "labelClin";
  			this.labelClin.Size = new System.Drawing.Size(104, 16);
  			this.labelClin.TabIndex = 52;
  			this.labelClin.Text = "Clinics";
  			this.labelClin.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
  			// 
  			// butCancel
  			// 
  			this.butCancel.AdjustImageLocation = new System.Drawing.Point(0, 0);
  			this.butCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
  			this.butCancel.Autosize = true;
  			this.butCancel.BtnShape = OpenDental.UI.enumType.BtnShape.Rectangle;
  			this.butCancel.BtnStyle = OpenDental.UI.enumType.XPStyle.Silver;
  			this.butCancel.CornerRadius = 4F;
  			this.butCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  			this.butCancel.Location = new System.Drawing.Point(714, 445);
  			this.butCancel.Name = "butCancel";
  			this.butCancel.Size = new System.Drawing.Size(75, 26);
  			this.butCancel.TabIndex = 4;
  			this.butCancel.Text = "&Cancel";
  			// 
  			// butOK
  			// 
  			this.butOK.AdjustImageLocation = new System.Drawing.Point(0, 0);
  			this.butOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
  			this.butOK.Autosize = true;
  			this.butOK.BtnShape = OpenDental.UI.enumType.BtnShape.Rectangle;
  			this.butOK.BtnStyle = OpenDental.UI.enumType.XPStyle.Silver;
  			this.butOK.CornerRadius = 4F;
  			this.butOK.Location = new System.Drawing.Point(714, 410);
  			this.butOK.Name = "butOK";
  
gt: 			this.butOK.Size = new System.Drawing.Size(75, 26);