private void addHHMember() { clsClient.clsHHmem.update(); AddNewClientOrHHMem frmAddHHMem = new AddNewClientOrHHMem(clsClient, true); frmAddHHMem.ShowDialog(); clsClient.clsHHmem.openHHID(clsClient.clsHH.ID); updateHouseholdData(); int hhMemID = 0; int tmpID = 0; int rowNbr = 0; for (int i = 0; i < clsClient.clsHHmem.RowCount; i++) { tmpID = clsClient.clsHHmem.DSet.Tables[0].Rows[i].Field <int>("ID"); if (hhMemID < tmpID) { rowNbr = i; hhMemID = tmpID; } } clsClient.clsHHmem.SetRecord(rowNbr); loadHHMems(false, clsClient.clsHHmem.ID); fillForm(); }
private void bntAddNewClient_Click(object sender, EventArgs e) { AddNewClientOrHHMem frmAddNew = new AddNewClientOrHHMem(clsClient, false); frmAddNew.ShowDialog(); if (frmAddNew.HHID > 0) { frmMainIn.setHousehold(frmAddNew.HHID, 0); if (CCFBPrefs.FindClientAutoRefresh == true) { loadList(); } } this.Close(); }
private void addHHMember() { AddNewClientOrHHMem frmAddHHMem = new AddNewClientOrHHMem(clsClient, true); frmAddHHMem.ShowDialog(); clsClient.clsHHmem.openHHID(clsClient.clsHH.ID); updateHouseholdData(); int hhMemID = 0; for (int i = 0; i < clsClient.clsHHmem.RowCount; i++) { if (hhMemID < Convert.ToInt32(clsClient.clsHHmem.DSet.Tables[0].Rows[i]["ID"])) { clsClient.clsHHmem.SetRecord(i); hhMemID = clsClient.clsHHmem.ID; } } loadList(clsClient.clsHHmem.ID); fillForm(); }