Exemplo n.º 1
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            CreditCard           cc      = (CreditCard)gridMain.Rows[e.Row].Tag;
            FormCreditCardManage FormCCM = new FormCreditCardManage(Patients.GetPat(cc.PatNum));

            FormCCM.ShowDialog();
            int totalCCs   = PIn.Int(textTotal.Text);
            int invalidCCs = PIn.Int(textInvalid.Text);
            List <CreditCard> listCardsForPat = CreditCards.Refresh(cc.PatNum);

            gridMain.BeginUpdate();
            for (int i = gridMain.Rows.Count - 1; i > -1; i--)     //loop through backwards and remove any cards that are no longer in the list
            {
                CreditCard ccGrid = (CreditCard)gridMain.Rows[i].Tag;
                if (cc.PatNum != ccGrid.PatNum)
                {
                    continue;
                }
                if (!listCardsForPat.Any(x => x.CreditCardNum == ccGrid.CreditCardNum))               //this row is one of the cards for the patient
                //if the card is no longer in the list of cards for the patient, it must have been deleted from FormCreditCardManage, remove from grid
                {
                    gridMain.Rows.RemoveAt(i);
                    _listCreditCards.RemoveAt(i);                    //so the list and grid contain the same number of items
                    //Valid cards may have been deleted as well, but we only maintain the count of invalids changing.
                    //Valid card count and total card count will be refreshed if/when the user presses the Check button again.
                    totalCCs--;                    //update total card count
                    invalidCCs--;                  //update invalid count
                }
            }
            gridMain.EndUpdate();
            textTotal.Text   = totalCCs.ToString();
            textInvalid.Text = invalidCCs.ToString();
        }
Exemplo n.º 2
0
		/*private void butTask_Click(object sender, System.EventArgs e) {
			//FormTaskListSelect FormT=new FormTaskListSelect(TaskObjectType.Patient,PatCur.PatNum);
			//FormT.ShowDialog();
		}*/

		private void butCreditCard_Click(object sender,EventArgs e) {
			FormCreditCardManage FormCCM=new FormCreditCardManage(PatCur);
			FormCCM.ShowDialog();
		}
Exemplo n.º 3
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            FormCreditCardManage FormCCM = new FormCreditCardManage(Patients.GetPat(CardList[gridMain.GetSelectedIndex()].PatNum));

            FormCCM.ShowDialog();
        }
Exemplo n.º 4
0
		private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e) {
			FormCreditCardManage FormCCM=new FormCreditCardManage(Patients.GetPat(CardList[gridMain.GetSelectedIndex()].PatNum));
			FormCCM.ShowDialog();
		}