Example #1
0
        private void btnSearchPhysicalPerson_Click(object sender, EventArgs e)
        {
            string passportNo = txtPassportNo.Text.Trim();
            string pinCode    = txtPinCode.Text.Trim();
            string firstName  = txtFirstName.Text.Trim();
            string lastName   = txtLastName.Text.Trim();
            string fatherName = txtFatherName.Text.Trim();

            if (!string.IsNullOrEmpty(passportNo) ||
                !string.IsNullOrEmpty(pinCode) ||
                !string.IsNullOrEmpty(firstName) ||
                !string.IsNullOrEmpty(lastName) ||
                !string.IsNullOrEmpty(fatherName))
            {
                progressBarPhysicalPerson.Visible = true;
                PHYSICAL_PERSON owner = new PHYSICAL_PERSON();
                owner.PASSPORT_NO       = passportNo;
                owner.PASSPORT_PIN_CODE = pinCode;
                owner.FIRST_NAME        = firstName;
                owner.LAST_NAME         = lastName;
                owner.FATHER_NAME       = fatherName;
                if (!_workerSearchPhysicalPerson.IsBusy)
                {
                    _workerSearchPhysicalPerson.RunWorkerAsync(owner);
                }
            }
            else
            {
                pHYSICALPERSONBindingSource.DataSource = _srvPhysicalPerson.LoadAllPerson(_businessParam);
                statusPhysicalPersonRowCount.Text      = "Cəmi: " + pHYSICALPERSONBindingSource.Count;
            }
        }
Example #2
0
        void _workerSearchPhysicalPerson_DoWork(object sender, DoWorkEventArgs e)
        {
            PHYSICAL_PERSON arg = e.Argument as PHYSICAL_PERSON;

            if (arg != null)
            {
                List <PHYSICAL_PERSON> result = _srvPhysicalPerson.FindPhysicalPerson(arg, _businessParam).ToList();
                e.Result = result;
            }
        }