예제 #1
0
        } // function UpdateARecord

        /// <summary>
        /// 获取外部参会者的信息
        /// </summary>
        /// <param name="conId">会议ID</param>
        /// <returns>返回外部参会者</returns>
        /// 作者:王宇昊
        /// 创建时间:2014-09-19
        /// 修改时间:
        public List <OutConMemberModel> GetConRecord(int conId)
        {
            try
            {
                List <OutConMemberModel> OutConMemberList = new List <OutConMemberModel>();

                DataSet data = SqlHelperDB.GetDataSet(DB.SqlHelperDB.ConnectionString, "select * from OutConMember where Conid='" + conId + "'", "OutConMember");

                foreach (DataRow row in data.Tables["OutConMember"].Rows)
                {
                    OutConMemberModel ConMember = new OutConMemberModel();
                    ConMember.ConId       = Convert.ToInt32(row["ConId"].ToString());
                    ConMember.ConName     = row["ConName"].ToString();
                    ConMember.ConSex      = row["ConSex"].ToString();
                    ConMember.ConDuties   = row["ConDuties"].ToString();
                    ConMember.ConPhone    = row["ConPhone"].ToString();
                    ConMember.ConEmail    = row["ConEmail"].ToString();
                    ConMember.ConCompany  = row["ConCompany"].ToString();
                    ConMember.ConRegister = char.Parse(row["ConRegister"].ToString());
                    OutConMemberList.Add(ConMember);
                }

                return(OutConMemberList);
            }
            catch
            {
                throw new Exception();
            }
        }// function GetConRecord
예제 #2
0
 /// <summary>
 /// 保存外部与会人员签到信息
 /// </summary>
 private void OutSave()
 {
     try
     {
         ExecutorBLL       Execu  = new ExecutorBLL();
         OutConMemberModel OutCon = new OutConMemberModel();
         for (int n = 0; n < dgvOutRegister.Rows.Count; n++)
         {
             string selectValue = dgvOutRegister.Rows[n].Cells["ColumnConRegister"].EditedFormattedValue.ToString();
             if (selectValue == "True")
             {
                 OutCon.ConId       = Convert.ToInt32(conid);
                 OutCon.ConRegister = '1';
                 OutCon.ConPhone    = dgvOutRegister.Rows[n].Cells["ColumnConPhone"].Value.ToString();
                 Execu.OutConMemberRegister(OutCon);
             }
             else
             {
                 OutCon.ConId       = Convert.ToInt32(conid);
                 OutCon.ConRegister = '0';
                 OutCon.ConPhone    = dgvOutRegister.Rows[n].Cells["ColumnConPhone"].Value.ToString();
                 Execu.OutConMemberRegister(OutCon);
             }
         }
         MessageBox.Show("提交成功", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         OutQuery();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #3
0
        /// <summary>
        /// 确认提交
        /// </summary>
        private void Ensure()
        {
            try
            {
                ExecutorBLL       Add          = new ExecutorBLL();
                OutConMemberModel OutConMember = new OutConMemberModel();

                OutConMember.ConId       = conid.Conid;
                OutConMember.ConName     = this.txtConName.Text;
                OutConMember.ConSex      = this.cmbConSex.Text;
                OutConMember.ConDuties   = this.txtConDuties.Text;
                OutConMember.ConPhone    = this.txtConPhone.Text;
                OutConMember.ConEmail    = this.txtConEmail.Text;
                OutConMember.ConCompany  = this.txtConCompany.Text;
                OutConMember.ConRegister = '0';

                Add.AddConMenRecord(OutConMember);
                this.DialogResult = DialogResult.OK;
                MessageBox.Show("提交成功", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #4
0
파일: UserBLL.cs 프로젝트: Ato42/CMS
        } // function  GetUserTopic

        /// <summary>
        /// 添加外部与会人员
        /// </summary>
        /// <returns> 添加外部与会人员</returns>
        /// 作者:王宇昊
        /// 创建时间:2014-09-20
        /// 修改时间:
        public void AddConMenRecord(OutConMemberModel outConMen)
        {
            try
            {
                OutConMemberDAL OCMDAL = new OutConMemberDAL();
                OCMDAL.AddARecord(outConMen);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        } // function AddConMenRecord
예제 #5
0
        } // function AddARecord

        /// <summary>
        /// 数据库外部与会人员表中删除一条信息
        /// </summary>
        /// <param name="obj">要删除的外部与会人员信息</param>
        /// <returns>操作成功返回true,失败返回false</returns>
        /// 作者:朱健
        /// 创建时间:2014-09-16
        /// 修改时间:2014-09-17
        public bool DelARecord(object obj)
        {
            try
            {
                OutConMemberModel OutConMember = (OutConMemberModel)obj;
                string            strSqlCmd;// 存储数据库命令语句
                strSqlCmd = string.Format("Delete from OutConMember where ConId ='{0}'", OutConMember.ConId);
                SqlHelperDB.ExecuteSql(SqlHelperDB.ConnectionString, strSqlCmd);
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        } // function DelARecord
예제 #6
0
 /// <summary>
 /// 向数据库外部与会人员表中插入一条新信息
 /// </summary>
 /// <param name="obj">一条新的外部与会人员信息</param>
 /// <returns>操作成功返回true,失败返回false</returns>
 /// 作者:朱健
 /// 创建时间:2014-09-16
 /// 修改时间:2014-09-17
 public bool AddARecord(object obj)
 {
     try
     {
         OutConMemberModel OutConMember = (OutConMemberModel)obj;
         string            strSqlCmd;// 存储数据库命令语句
         strSqlCmd = string.Format("insert into OutConMember values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}')",
                                   OutConMember.ConId, OutConMember.ConName, OutConMember.ConSex, OutConMember.ConDuties,
                                   OutConMember.ConPhone, OutConMember.ConEmail, OutConMember.ConCompany, OutConMember.ConRegister);
         SqlHelperDB.ExecuteSql(SqlHelperDB.ConnectionString, strSqlCmd);
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 } // function AddARecord
예제 #7
0
        }// function GetConRecord

        /// <summary>
        /// 修改外部人员签到信息
        /// </summary>
        /// <param name="obj">要修改的外部与会人员信息</param>
        /// <returns>操作成功返回true,失败返回false</returns>
        /// 作者:王宇昊
        /// 创建时间:2014-09-16
        /// 修改时间:2014-09-17
        public bool UpdateRegisterRecord(object obj)
        {
            try
            {
                OutConMemberModel OutConMember = (OutConMemberModel)obj;
                string            strSqlCmd;// 存储数据库命令语句
                strSqlCmd = string.Format(@"update OutConMember set 
                                            ConRegister='{2}' where ConID='{0}'and ConPhone='{1}'",
                                          OutConMember.ConId, OutConMember.ConPhone, OutConMember.ConRegister);
                SqlHelperDB.ExecuteSql(SqlHelperDB.ConnectionString, strSqlCmd);
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        } // function UpdateARecord
예제 #8
0
        } // function DelARecord

        /// <summary>
        /// 向数据库外部与会人员表中修改信息
        /// </summary>
        /// <param name="obj">要修改的外部与会人员信息</param>
        /// <returns>操作成功返回true,失败返回false</returns>
        /// 作者:朱健
        /// 创建时间:2014-09-16
        /// 修改时间:2014-09-17
        public bool UpdateARecord(object obj)
        {
            try
            {
                OutConMemberModel OutConMember = (OutConMemberModel)obj;
                string            strSqlCmd;// 存储数据库命令语句
                strSqlCmd = string.Format(@"update OutConMember set 
                                            ConName='{1}',ConSex='{2}', ConDuties='{3}',ConPhone='{4}',
                                            ConEmail='{5}', ConCompany='{6}', ConRegister='{7}' where ConID='{0}'",
                                          OutConMember.ConId, OutConMember.ConName, OutConMember.ConSex, OutConMember.ConDuties,
                                          OutConMember.ConPhone, OutConMember.ConEmail, OutConMember.ConCompany, OutConMember.ConRegister);
                SqlHelperDB.ExecuteSql(SqlHelperDB.ConnectionString, strSqlCmd);
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        } // function UpdateARecord
예제 #9
0
        }// function GetOutConMemberRegisterInfo

        /// <summary>
        /// 外部与会人员签到
        /// </summary>
        /// <param name="RegisterMan"></param>
        /// 作者:王宇昊
        /// 创建时间:2014-09-19
        /// 修改时间:
        public void OutConMemberRegister(OutConMemberModel RegisterMan)
        {
            OutConMemberDAL OCMDAL = new OutConMemberDAL();

            OCMDAL.UpdateRegisterRecord(RegisterMan);
        } // function OutConMemberRegister