Esempio n. 1
0
        public frmStudentOrderNew()
        {
            InitializeComponent();

            this._IGeneralBL = GeneralBLLFactory.GetBLL<IGeneralBL>(GeneralBLLFactory.General);

            this._IPaymentUDMealStateBL = MasterBLLFactory.GetBLL<IPaymentUDMealStateBL>(MasterBLLFactory.PaymentUDMealState);

            this._IPaymentUDGeneralSettingBL = MasterBLLFactory.GetBLL<IPaymentUDGeneralSettingBL>(MasterBLLFactory.PaymentUDGeneralSetting);

            this._ICardUserMasterBL = MasterBLLFactory.GetBLL<ICardUserMasterBL>(MasterBLLFactory.CardUserMaster);

            this._CurrentStudentID = Guid.Empty;

            this._EditState = Common.DefineConstantValue.EditStateEnum.OE_ReaOnly;

            ListViewSorter sorterGrade = new ListViewSorter(1, SortOrder.Ascending);
            lvStudentList.ListViewItemSorter = sorterGrade;
            lvStudentList.Sorting = SortOrder.Ascending;

            ListViewSorter sorterOrder = new ListViewSorter(1, SortOrder.Ascending);
            lvSpecialOrder.ListViewItemSorter = sorterOrder;
            lvSpecialOrder.Sorting = SortOrder.Ascending;

            labRecordTime.Text = "无记录";
        }
Esempio n. 2
0
        /// <summary>
        /// 加载班级信息
        /// </summary>
        void loadAllClassList()
        {
            this.Cursor = Cursors.WaitCursor;
            try
            {
                this._ListAllClassInfos = this._IClassMasterBL.AllRecords();

                lvClassList.SetDataSource(_ListAllClassInfos);

                ListViewSorter sorter = new ListViewSorter(1, SortOrder.Ascending);
                lvClassList.ListViewItemSorter = sorter;
                lvClassList.Sorting = SortOrder.Ascending;
            }
            catch (Exception Ex)
            {
                ShowErrorMessage(Ex.Message);
            }

            sysToolBar.BtnModify_IsEnabled = false;
            sysToolBar.BtnDelete_IsEnabled = false;
            sysToolBar.BtnNew_IsEnabled = true;
            sysToolBar.BtnRefresh_IsEnabled = true;

            this.Cursor = Cursors.Default;
        }
Esempio n. 3
0
 private void lvGradeList_ColumnClick(object sender, ColumnClickEventArgs e)
 {
     if (lvGradeList.Sorting == SortOrder.Descending)
     {
         ListViewSorter sorter = new ListViewSorter(e.Column, SortOrder.Ascending);
         lvGradeList.ListViewItemSorter = sorter;
         lvGradeList.Sorting = SortOrder.Ascending;
     }
     else
     {
         ListViewSorter sorter = new ListViewSorter(e.Column, SortOrder.Descending);
         lvGradeList.ListViewItemSorter = sorter;
         lvGradeList.Sorting = SortOrder.Descending;
     }
 }
Esempio n. 4
0
        private void SearchStudents()
        {
            try
            {
                CardUserMaster_cus_Info queryInfo = new CardUserMaster_cus_Info();

                if (cboClass.SelectedValue != null && !string.IsNullOrEmpty(cboClass.Text))
                {
                    queryInfo.cus_cClassID = new Guid(cboClass.SelectedValue.ToString());
                }
                if (!string.IsNullOrEmpty(tbxStudentID.Text))
                {
                    queryInfo.cus_cStudentID = tbxStudentID.Text.Trim().Replace("'", "''");
                }
                if (!string.IsNullOrEmpty(tbxStudenName.Text))
                {
                    queryInfo.cus_cChaName = tbxStudenName.Text.Trim().Replace("'", "''");
                }
                if (cboSex.SelectedValue != null && !string.IsNullOrEmpty(cboSex.Text))
                {
                    queryInfo.cus_cSexNum = cboSex.SelectedValue.ToString();
                }
                queryInfo.cus_lIsGraduate = cbxVaild.Checked;
                queryInfo.cus_cIdentityNum = Common.DefineConstantValue.CodeMasterDefine.KEY2_SIOT_CardUserIdentity_Student;

                try
                {
                    this.Cursor = Cursors.WaitCursor;

                    List<CardUserMaster_cus_Info> returnList = this._ICardUserMasterBL.SearchRecord_ForMaster(queryInfo);

                    if (returnList != null && returnList.Count > 0)
                    {
                        this._ListQueryStuInfo.Clear();

                        //foreach (CardUserMaster_cus_Info item in returnList)
                        //{
                        //    this._ListQueryStuInfo.Add(item);
                        //}
                        this._ListQueryStuInfo.AddRange(returnList);

                        lvStudentList.Items.Clear();
                        lvStudentList.SetDataSource(returnList);
                        gbxRes.Text = "查询结果:共 " + returnList.Count.ToString() + " 条";

                        ListViewSorter sorter = new ListViewSorter(1, SortOrder.Ascending);
                        lvStudentList.ListViewItemSorter = sorter;
                        lvStudentList.Sorting = SortOrder.Ascending;

                        btnExportGradeUp.Enabled = true;

                        btnBatchmodify.Enabled = true;
                    }
                    else
                    {

                        lvStudentList.Items.Clear();

                        this._ListQueryStuInfo = new List<CardUserMaster_cus_Info>();

                        ShowInformationMessage(Common.DefineConstantValue.SystemMessageText.strMessageText_W_RecordIsEmpty);

                        btnExportGradeUp.Enabled = false;

                        btnBatchmodify.Enabled = false;

                        gbxRes.Text = "查询结果:共 0 条";
                    }
                }
                catch (Exception Ex)
                {
                    ShowErrorMessage(Ex);
                }
            }
            catch (Exception exx)
            {
                ShowErrorMessage(exx);
            }
            this.Cursor = Cursors.Default;
        }
Esempio n. 5
0
        private void SearchStaffList(CardUserMaster_cus_Info query)
        {
            this.Cursor = Cursors.WaitCursor;

            this._ListQueryUserInfos = new List<CardUserMaster_cus_Info>();
            try
            {
                List<CardUserMaster_cus_Info> result = this._ICardUserMasterBL.SearchRecord_ForMaster(query);

                if (result != null)
                {
                    if (result.Count < 1)
                    {
                        ShowInformationMessage("没有合符条件的记录。");
                    }
                    //foreach (CardUserMaster_cus_Info item in result)
                    //{
                    //    if (item.DeptInfo != null)
                    //    {
                    //        item.DepartmentName = item.DeptInfo.dpm_cName;
                    //        item.SexName = item.cus_cSexNum == Common.DefineConstantValue.CodeMasterDefine.KEY2_SIOT_CardUserSex_MALE ? "男" : "女";
                    //    }
                    //    this._ListQueryUserInfos.Add(item);
                    //}
                    this._ListQueryUserInfos.Clear();
                    this._ListQueryUserInfos.AddRange(result);
                    gbxRes.Text = "查询结果:共 " + result.Count + " 条";
                }
                else
                {
                    this._ListQueryUserInfos.Clear();
                }

                lvStaffList.SetDataSource(result);

                ListViewSorter sorter = new ListViewSorter(1, SortOrder.Ascending);
                lvStaffList.ListViewItemSorter = sorter;
                lvStaffList.Sorting = SortOrder.Ascending;
            }
            catch (Exception Ex)
            {
                ShowErrorMessage(Ex.Message);
            }

            sysToolBar.BtnNew_IsEnabled = true;
            sysToolBar.BtnModify_IsEnabled = false;
            sysToolBar.BtnDelete_IsEnabled = false;
            sysToolBar.BtnRefresh_IsEnabled = true;

            this.Cursor = Cursors.Default;
        }
        private void btnAddRoleUser_Click(object sender, EventArgs e)
        {
            SysUserMasterSearch dlgUserSearch = new SysUserMasterSearch();
            dlgUserSearch.ShowDialog();
            List<Sys_UserMaster_usm_Info> listUserAdd = dlgUserSearch._RtvInfo;
            foreach (ListViewItem item in lvRoleUserList.Items)
            {
                int iRecord = Convert.ToInt32(item.SubItems[0].Text);
                Sys_UserMaster_usm_Info user = listUserAdd.Find(x => x.usm_iRecordID == iRecord);
                if (user != null)
                {
                    listUserAdd.Remove(user);
                }
            }
            lvRoleUserList.SetDataSource<Sys_UserMaster_usm_Info>(listUserAdd, false);

            ListViewSorter sorter = new ListViewSorter(1, SortOrder.Ascending);
            lvRoleUserList.ListViewItemSorter = sorter;
            lvRoleUserList.Sorting = SortOrder.Ascending;
        }
        /// <summary>
        /// 綁定用戶信息
        /// </summary>
        private void BindUserInfos()
        {
            this.Cursor = Cursors.WaitCursor;

            try
            {
                Sys_UserMaster_usm_Info searchInfo = new Sys_UserMaster_usm_Info();
                List<IModelObject> listObjUser = this._ISysUserMasterBL.SearchRecords(searchInfo);
                List<Sys_UserMaster_usm_Info> listUsers = new List<Sys_UserMaster_usm_Info>();
                foreach (Sys_UserMaster_usm_Info userItem in listObjUser)
                {
                    if (userItem != null)
                    {
                        listUsers.Add(userItem);
                    }
                }
                this._ListUserMasterInfo = listUsers;
                lvUsers.SetDataSource<Sys_UserMaster_usm_Info>(listUsers);

                ListViewSorter sorter = new ListViewSorter(1, SortOrder.Ascending);
                lvUsers.ListViewItemSorter = sorter;
                lvUsers.Sorting = SortOrder.Ascending;

                lvPurviewUser.SetDataSource(listUsers);

                this._isEdited = false;

                this._ListUserMasterInfo = listUsers;
            }
            catch (Exception ex)
            {
                this.ShowErrorMessage("系統異常,異常信息:" + ex.Message);
                this.Cursor = Cursors.Default;
            }

            this.Cursor = Cursors.Default;
        }
Esempio n. 8
0
 private void livHistoryRecord_ColumnClick(object sender, ColumnClickEventArgs e)
 {
     if (livHistoryRecord.Sorting == SortOrder.Ascending)
     {
         ListViewSorter sorter = new ListViewSorter(e.Column, SortOrder.Descending);
         livHistoryRecord.ListViewItemSorter = sorter;
         livHistoryRecord.Sorting = SortOrder.Descending;
     }
     else
     {
         ListViewSorter sorter = new ListViewSorter(e.Column, SortOrder.Ascending);
         livHistoryRecord.ListViewItemSorter = sorter;
         livHistoryRecord.Sorting = SortOrder.Ascending;
     }
 }