Exemplo n.º 1
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,0);
     if (DialogResult.OK == myForm.ShowDialog(this))
     {
         ucMemberID1.EditValue = myForm.StrMemberShipID;
     }
     myForm.Dispose();
 }
Exemplo n.º 2
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, 0),
                    // txtMembershipID.Text, DBNull.Value, 1);

                            frmSearchMember myForm = new frmSearchMember(myMemberRecord,
                             myMemberRecord.SearchMember(txtMembershipID.Text, DBNull.Value,
                             ACMSLogic.MemberRecord.SearchMemberType.AllMember, 0),
                             txtMembershipID.Text, DBNull.Value,0);

                    if (DialogResult.OK == myForm.ShowDialog(this))
                    {
                        txtMembershipID.Text = myForm.StrMemberShipID;

                        if (myEditValueChangedEvent != null)
                        {
                            myEditValueChangedEvent(txtMembershipID.Text);
                        }
                    }
                    myForm.Dispose();
                }
                finally
                {
                    Cursor.Current = saveCursor;

            //}
            //else
            //{
            //    try
            //    {
            //        myMemberRecord = new MemberRecord(strBranchCode);

            //        frmSearchMember myForm = new frmSearchMember(myMemberRecord,
            //         myMemberRecord.SearchMember(txtMembershipID.Text, DBNull.Value,
            //         ACMSLogic.MemberRecord.SearchMemberType.NonMember, 1),
            //         txtMembershipID.Text, DBNull.Value, 1);

            //        if (DialogResult.OK == myForm.ShowDialog(this))
            //        {
            //            txtMembershipID.Text = myForm.StrMemberShipID;

            //            if (myEditValueChangedEvent != null)
            //            {
            //                myEditValueChangedEvent(txtMembershipID.Text);
            //            }
            //        }
            //        myForm.Dispose();
            //    }
            //    finally
            //    {
            //        Cursor.Current = saveCursor;
            //    }
            }
        }