コード例 #1
0
ファイル: ConferenceModForm.cs プロジェクト: Ato42/CMS
        private void btnEnsure_Click(object sender, EventArgs e)
        {
            if (DialogResult.OK == MessageBox.Show("确定修改吗", "系统消息", MessageBoxButtons.OKCancel))
            {
                ConferenceAuditorBLL   auditbll = new ConferenceAuditorBLL();
                List <ConferenceModel> conlist  = new List <ConferenceModel>();
                conlist = auditbll.GetConferenceInfo(selecetedConId.ToString());
                foreach (ConferenceModel con in conlist)
                {
                    if (con.ConId == this.selecetedConId)
                    {
                        con.ConHost = cmbHost.Text;
                        List <BoardroomModel> bdrlist = new List <BoardroomModel>();
                        bdrlist = auditbll.GetBoardroomInfo(cmbPlace.Text);
                        foreach (BoardroomModel bdr in bdrlist)
                        {
                            con.ConPlace = bdr.BdrId;
                        }
                        con.ConStartTime = dtpStart.Value;
                        con.ConEndTime   = dtpEnd.Value;

                        auditbll.UpdateCon(con);
                        MessageBox.Show("修改成功!");
                    }
                }
            }
        }
コード例 #2
0
        /// <summary>
        /// 绑定LIST到datagridview
        /// </summary>
        /// 作者:吴欣哲
        /// 创建时间:20140919
        public void BindDataToDgv()
        {
            dgvReturn.Rows.Clear();
            ConferenceAuditorBLL   con     = new ConferenceAuditorBLL();
            List <ConferenceModel> conList = new List <ConferenceModel>();

            conList = con.GetConferenceInfo(txtQuery.Text);
            int n = 0;

            foreach (ConferenceModel conference in conList)
            {
                dgvReturn.Rows.Add();
                dgvReturn.Rows[n].Cells["Column1"].Value = conference.ConId;
                if (conference.ConStatus == '0')
                {
                    dgvReturn.Rows[n].Cells["Column2"].Value = "未审核";
                }
                else if (conference.ConStatus == '1')
                {
                    dgvReturn.Rows[n].Cells["Column2"].Value = "审核通过";
                }
                else if (conference.ConStatus == '2')
                {
                    dgvReturn.Rows[n].Cells["Column2"].Value = "不通过";
                }
                dgvReturn.Rows[n].Cells["Column3"].Value = conference.ConName;
                dgvReturn.Rows[n].Cells["Column4"].Value = conference.ConStartTime;
                dgvReturn.Rows[n].Cells["Column5"].Value = conference.ConEndTime;
                UserBLL userbll = new UserBLL();
                List <BoardroomModel> bdrlist = new List <BoardroomModel>();
                bdrlist = userbll.GetBoardroomInfo(conference.ConPlace.ToString());
                foreach (BoardroomModel bdr in bdrlist)
                {
                    if (bdr.BdrId == conference.ConId)
                    {
                        dgvReturn.Rows[n].Cells["Column6"].Value = bdr.BdrName;
                    }
                }


                n++;
            }
        }
コード例 #3
0
ファイル: ConferenceAuditForm.cs プロジェクト: Ato42/CMS
        /// <summary>
        /// 在dgvAudit选中单元格时显示详细信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgvAudit_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            string strConName = dgvAudit.CurrentRow.Cells["ColumnConId2"].Value.ToString();
            List <ConferenceModel> conlist = new List <ConferenceModel>();
            List <EmployeeModel>   inclist = new List <EmployeeModel>();

            conlist = auditbll.GetConferenceInfo(strConName);
            foreach (ConferenceModel con in conlist)
            {
                if (int.Parse(strConName) == con.ConId)
                {
                    inclist = exebll.GetInConMemberInfo(con);
                    cmbRecMan.Items.Clear();
                    foreach (EmployeeModel em in inclist)
                    {
                        cmbRecMan.Items.Add(em.EmName);
                    }
                    cmbRecMan.Text      = auditbll.GetAEmployee(con.ConRecordMen).EmName;
                    cmbRecMan.Enabled   = false;
                    cmbStaffMan.Text    = auditbll.GetAEmployee(con.ConStaffMen).EmName;
                    cmbStaffMan.Enabled = false;

                    txtConId.Text        = con.ConId.ToString();
                    txtConId.Enabled     = false;
                    cmbHost.SelectedItem = con.ConHost;
                    cmbTopic.Text        = con.ConName;
                    cmbTopic.Enabled     = false;
                    rtxRemarks2.Text     = con.ConOthers;
                    if (con.ConRegister == '0')
                    {
                        txtReg.Text = "不用签到";
                    }
                    else
                    {
                        txtReg.Text = "需要签到";
                    }
                    txtReg.Enabled = false;
                    if (con.ConType == '0')
                    {
                        txtType.Text = "内部会议";
                    }
                    else
                    {
                        txtType.Text = "外部会议";
                    }
                    txtType.Enabled = false;
                    List <BoardroomModel> bdrlist = new List <BoardroomModel>();
                    bdrlist = auditbll.GetBoardroomInfo(con.ConPlace.ToString());
                    foreach (BoardroomModel bdr in bdrlist)
                    {
                        cmbPlace.Text = bdr.BdrName;
                    }
                    List <ResourceModel> reslist = new List <ResourceModel>();
                    reslist = auditbll.GetConUseResourceInfo(con.ConId);
                    lstStaff2.Items.Clear();
                    foreach (ResourceModel res in reslist)
                    {
                        lstStaff2.Items.Add(res.ResourceId + "  " + res.ResourceClass);
                    }
                }
            }
        }