コード例 #1
0
        private void LoadData()
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                List <modAccSubjectList> list1 = _dal.GetIList("1", true, out Util.emsg);
                DBGrid.DataSource = list1;

                List <modAccSubjectList> list2 = _dal.GetIList("5", true, out Util.emsg);
                DBGrid2.DataSource = list2;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
コード例 #2
0
        private void LoadData()
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                string subjectid = string.Empty;
                if (rb1.Checked)
                {
                    subjectid = "913530";
                }
                else if (rb2.Checked)
                {
                    subjectid = "913535";
                }
                else
                {
                    subjectid = "913540";
                }

                List <modAccSubjectList> list = _dal.GetIList(subjectid, false, out Util.emsg);
                DBGrid.DataSource = list;
                if (list == null && !string.IsNullOrEmpty(Util.emsg))
                {
                    MessageBox.Show(Util.emsg, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }