예제 #1
0
        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();
        }
예제 #2
0
        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();
        }
예제 #3
0
        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();
        }