Esempio n. 1
0
        private void OnDisplaySpecialityList()
        {
            Result result = SpecialityBus.GetSpecialityList();

            if (result.IsOK)
            {
                MethodInvoker method = delegate
                {
                    ClearData();
                    dgSpeciality.DataSource = result.QueryResult;
                };

                if (InvokeRequired)
                {
                    BeginInvoke(method);
                }
                else
                {
                    method.Invoke();
                }
            }
            else
            {
                MsgBox.Show(Application.ProductName, result.GetErrorAsString("SpecialityBus.GetSpecialityList"), IconType.Error);
                Utility.WriteToTraceLog(result.GetErrorAsString("SpecialityBus.GetSpecialityList"));
            }
        }
Esempio n. 2
0
        private void InitData()
        {
            cboGender.SelectedIndex    = 0;
            cboWorkType.SelectedIndex  = 0;
            cboStaffType.SelectedIndex = 0;

            //Load Speciality List
            Result result = SpecialityBus.GetSpecialityList();

            if (result.IsOK)
            {
                cboSpeciality.DataSource = result.QueryResult;
            }
            else
            {
                MsgBox.Show(this.Text, result.GetErrorAsString("SpecialityBus.GetSpecialityList"), IconType.Error);
                Utility.WriteToTraceLog(result.GetErrorAsString("SpecialityBus.GetSpecialityList"));
            }
        }