Example #1
0
        private void butAdd_Click(object sender, System.EventArgs e)
        {
            PayPeriod payPeriodCur = new PayPeriod();

            if (PayPeriods.GetCount() == 0)
            {
                payPeriodCur.DateStart = DateTime.Today;
            }
            else
            {
                payPeriodCur.DateStart = PayPeriods.GetLast().DateStop.AddDays(1);
            }
            payPeriodCur.DateStop     = payPeriodCur.DateStart.AddDays(13);      //payPeriodCur.DateStop is inclusive, this is effectively a 14 day default pay period. This only affects default date of newly created pay periods.
            payPeriodCur.DatePaycheck = payPeriodCur.DateStop.AddDays(4);
            FormPayPeriodEdit FormP = new FormPayPeriodEdit(payPeriodCur);

            FormP.IsNew = true;
            FormP.ShowDialog();
            if (FormP.DialogResult == DialogResult.Cancel)
            {
                return;
            }
            FillGrid();
            changed = true;
        }
Example #2
0
        private void butAdd_Click(object sender, System.EventArgs e)
        {
            PayPeriod payPeriodCur = new PayPeriod();

            if (PayPeriods.List.Length == 0)
            {
                payPeriodCur.DateStart = DateTime.Today;
            }
            else
            {
                payPeriodCur.DateStart = PayPeriods.List[PayPeriods.List.Length - 1].DateStop.AddDays(1);
            }
            payPeriodCur.DateStop     = payPeriodCur.DateStart.AddDays(14);
            payPeriodCur.DatePaycheck = payPeriodCur.DateStop.AddDays(4);
            FormPayPeriodEdit FormP = new FormPayPeriodEdit(payPeriodCur);

            FormP.IsNew = true;
            FormP.ShowDialog();
            if (FormP.DialogResult == DialogResult.Cancel)
            {
                return;
            }
            FillGrid();
            changed = true;
        }
Example #3
0
        private void gridMain_CellDoubleClick(object sender, OpenDental.UI.ODGridClickEventArgs e)
        {
            FormPayPeriodEdit FormP = new FormPayPeriodEdit(PayPeriods.List[e.Row]);

            FormP.ShowDialog();
            FillGrid();
            changed = true;
        }
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            //Allowing modification of pay periods here will cause insertions/updates.  It would require changing in FormPayPeriodEdit to not insert/update.
            FormPayPeriodEdit FormP = new FormPayPeriodEdit(_listPayPeriods[e.Row]);

            FormP.IsSaveToDb = false;
            FormP.ShowDialog();
            FillGrid();
        }
Example #5
0
        private void gridMain_CellDoubleClick(object sender, OpenDental.UI.ODGridClickEventArgs e)
        {
            FormPayPeriodEdit FormP = new FormPayPeriodEdit((PayPeriod)gridMain.ListGridRows[e.Row].Tag);

            FormP.ShowDialog();
            if (FormP.DialogResult == DialogResult.Cancel)
            {
                return;
            }
            FillGrid();
            changed = true;
        }
Example #6
0
 private void butAdd_Click(object sender, System.EventArgs e)
 {
     PayPeriod payPeriodCur=new PayPeriod();
     if(PayPeriods.List.Length==0){
         payPeriodCur.DateStart=DateTime.Today;
     }
     else{
         payPeriodCur.DateStart=PayPeriods.List[PayPeriods.List.Length-1].DateStop.AddDays(1);
     }
     payPeriodCur.DateStop=payPeriodCur.DateStart.AddDays(14);
     payPeriodCur.DatePaycheck=payPeriodCur.DateStop.AddDays(4);
     FormPayPeriodEdit FormP=new FormPayPeriodEdit(payPeriodCur);
     FormP.IsNew=true;
     FormP.ShowDialog();
     if(FormP.DialogResult==DialogResult.Cancel){
         return;
     }
     FillGrid();
     changed=true;
 }
Example #7
0
 private void gridMain_CellDoubleClick(object sender, OpenDental.UI.ODGridClickEventArgs e)
 {
     FormPayPeriodEdit FormP=new FormPayPeriodEdit(PayPeriods.List[e.Row]);
     FormP.ShowDialog();
     FillGrid();
     changed=true;
 }
Example #8
0
		private void butAdd_Click(object sender, System.EventArgs e) {
			PayPeriod payPeriodCur=new PayPeriod();
			if(PayPeriods.List.Length==0){
				payPeriodCur.DateStart=DateTime.Today;
			}
			else{
				payPeriodCur.DateStart=PayPeriods.List[PayPeriods.List.Length-1].DateStop.AddDays(1);
			}
			payPeriodCur.DateStop=payPeriodCur.DateStart.AddDays(13);//payPeriodCur.DateStop is inclusive, this is effectively a 14 day default pay period. This only affects default date of newly created pay periods.
			payPeriodCur.DatePaycheck=payPeriodCur.DateStop.AddDays(4);
			FormPayPeriodEdit FormP=new FormPayPeriodEdit(payPeriodCur);
			FormP.IsNew=true;
			FormP.ShowDialog();
			if(FormP.DialogResult==DialogResult.Cancel){
				return;
			}
			FillGrid();
			changed=true;
		}