Beispiel #1
0
        private void ModifyMember()
        {
            if (lbxMembership.SelectedItems == null || lbxMembership.SelectedItems.Count < 1)
            {
                MessageBox.Show("수정할 회원을 먼저 선택해 주십시오.", "회원정보수정 안내");
                lbxMembership.Focus();
                return;
            }

            int idx = lbxMembership.SelectedItems[0].Index;

            VRSMemberForm dlg = new VRSMemberForm();

            dlg.Text = "회원 정보 수정";

            dlg.m_Member = lbxMembership.Items[idx].Tag as Membership;

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                int id = Convert.ToInt32(lbxMembership.Items[idx].Name);
                VRSDataSet.tblMembershipRow row = vrsDataSet.tblMembership.FindById(id);
                SetMemberData(dlg.m_Member, ref row);

                if (row.RowState == DataRowState.Modified)
                {
                    //데이터소스에 반영
                    this.Validate();
                    this.tblMembershipTableAdt.Update(row);

                    SetMemberListView();
                }
            }
        }
Beispiel #2
0
        private void CreaterMember()
        {
            VRSMemberForm dlg = new VRSMemberForm();

            dlg.Text = "신규회원 등록";

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                VRSDataSet.tblMembershipRow row = vrsDataSet.tblMembership.NewtblMembershipRow();
                SetMemberData(dlg.m_Member, ref row);

                vrsDataSet.tblMembership.Rows.Add(row);

                //데이터소스에 반영
                this.Validate();
                this.tblMembershipTableAdt.Update(row);

                SetMemberListView();
            }
        }