Ejemplo n.º 1
0
        private void gridBen_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            int             benefitListI = benList.IndexOf(benList[e.Row]);
            FormBenefitEdit FormB        = new FormBenefitEdit(0, PlanNum);

            FormB.BenCur = benList[e.Row];
            FormB.ShowDialog();
            if (FormB.BenCur == null)           //user deleted
            {
                benList.RemoveAt(benefitListI);
            }
            FillGridBen();
        }
Ejemplo n.º 2
0
 private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
 {
     if (e.Col < 2)           //raw benefit
     {
         FormEtrans270EBraw FormE = new FormEtrans270EBraw();
         FormE.EB271val = listEB[e.Row];
         FormE.ShowDialog();
         //user can't make changes, so no need to refresh grid.
     }
     else                                    //generated benefit
     {
         if (listEB[e.Row].Benefitt == null) //create new benefit
         {
             listEB[e.Row].Benefitt = new Benefit();
             FormBenefitEdit FormB = new FormBenefitEdit(0, PlanNum);
             FormB.IsNew  = true;
             FormB.BenCur = listEB[e.Row].Benefitt;
             FormB.ShowDialog();
             if (FormB.BenCur == null)                   //user deleted or cancelled
             {
                 listEB[e.Row].Benefitt = null;
             }
         }
         else                  //edit existing benefit
         {
             FormBenefitEdit FormB = new FormBenefitEdit(0, PlanNum);
             FormB.BenCur = listEB[e.Row].Benefitt;
             FormB.ShowDialog();
             if (FormB.BenCur == null)                   //user deleted
             {
                 listEB[e.Row].Benefitt = null;
             }
         }
         FillGrid();
     }
 }
Ejemplo n.º 3
0
		private void gridBen_CellDoubleClick(object sender,ODGridClickEventArgs e) {
			int benefitListI=benList.IndexOf(benList[e.Row]);
			FormBenefitEdit FormB=new FormBenefitEdit(0,PlanNum);
			FormB.BenCur=benList[e.Row];
			FormB.ShowDialog();
			if(FormB.BenCur==null) {//user deleted
				benList.RemoveAt(benefitListI);
			}
			FillGridBen();
		}
Ejemplo n.º 4
0
		private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e) {
			if(e.Col==0) {//raw benefit
				FormEtrans270EBraw FormE=new FormEtrans270EBraw();
				FormE.EB271val=listEB[e.Row];
				FormE.ShowDialog();
				//user can't make changes, so no need to refresh grid.
			}
			else {//generated benefit
				if(listEB[e.Row].Benefitt==null) {//create new benefit
					listEB[e.Row].Benefitt=new Benefit();
					FormBenefitEdit FormB=new FormBenefitEdit(0,PlanNum);
					FormB.IsNew=true;
					FormB.BenCur=listEB[e.Row].Benefitt;
					FormB.ShowDialog();
					if(FormB.BenCur==null) {//user deleted or cancelled
						listEB[e.Row].Benefitt=null;
					}
				}
				else {//edit existing benefit
					FormBenefitEdit FormB=new FormBenefitEdit(0,PlanNum);
					FormB.BenCur=listEB[e.Row].Benefitt;
					FormB.ShowDialog();
					if(FormB.BenCur==null) {//user deleted
						listEB[e.Row].Benefitt=null;
					}
				}
				FillGrid();
			}
		}
Ejemplo n.º 5
0
		private void butAdd_Click(object sender,EventArgs e) {
			Benefit ben=new Benefit();
			ben.PlanNum=PlanNum;
			if(checkCalendarYear.CheckState==CheckState.Checked) {
				ben.TimePeriod=BenefitTimePeriod.CalendarYear;
			}
			if(checkCalendarYear.CheckState==CheckState.Unchecked) {
				ben.TimePeriod=BenefitTimePeriod.ServiceYear;
			}
			if(CovCatC.ListShort.Count>0){
				ben.CovCatNum=CovCatC.ListShort[0].CovCatNum;
			}
			ben.BenefitType=InsBenefitType.CoInsurance;
			FormBenefitEdit FormB=new FormBenefitEdit(PatPlanNum,PlanNum);
			FormB.IsNew=true;
			FormB.BenCur=ben;
			FormB.ShowDialog();
			if(FormB.DialogResult==DialogResult.OK){
				benefitList.Add(FormB.BenCur);
				benefitListAll.Add(FormB.BenCur);
			}
			FillGrid();
		}