Exemplo n.º 1
0
        private void sbtnFind_Click(object sender, System.EventArgs e)
        {
            if (strBranchCode == null)
            {
                UI.ShowErrorMessage(this, "You forgot to set StrBranchCode property.");
                return;
            }
            Cursor saveCursor = Cursor.Current;

            Cursor.Current = Cursors.WaitCursor;
            try
            {
                myMemberRecord = new MemberRecord(strBranchCode);
                frmSearchMember myForm = new frmSearchMember(myMemberRecord,
                                                             myMemberRecord.SearchMember(txtMembershipID.Text, DBNull.Value,
                                                                                         ACMSLogic.MemberRecord.SearchMemberType.AllMember, 1),
                                                             txtMembershipID.Text, DBNull.Value);
                if (DialogResult.OK == myForm.ShowDialog(this))
                {
                    txtMembershipID.Text = myForm.StrMemberShipID;

                    if (myEditValueChangedEvent != null)
                    {
                        myEditValueChangedEvent(txtMembershipID.Text);
                    }
                }
                myForm.Dispose();
            }
            finally
            {
                Cursor.Current = saveCursor;
            }
        }
Exemplo n.º 2
0
        private void sbtnFind_Click(object sender, System.EventArgs e)
        {
            frmSearchMember myForm = new frmSearchMember(myMemberRecord,
                                                         myMemberRecord.SearchMember(ucMemberID1.EditValue.ToString(), strTerminalBranchCode,
                                                                                     ACMSLogic.MemberRecord.SearchMemberType.AllMember, 1),
                                                         ucMemberID1.EditValue.ToString(), strTerminalBranchCode);

            if (DialogResult.OK == myForm.ShowDialog(this))
            {
                ucMemberID1.EditValue = myForm.StrMemberShipID;
            }
            myForm.Dispose();
        }