Пример #1
0
        public List <ConferenceUserListModel> GetConferenceUserListList(string SortColumns, int StartRecord, int MaxRecords, int ConferenceCodeEqual, string UserCodeEqual, string TypeEqual, string UserNameEqual, int CodeEqual)
        {
            List <ConferenceUserListModel> models        = new List <ConferenceUserListModel>();
            ConferenceUserListQueryModel   objQueryModel = new ConferenceUserListQueryModel();

            objQueryModel.StartRecord         = StartRecord;
            objQueryModel.MaxRecords          = MaxRecords;
            objQueryModel.SortColumns         = SortColumns;
            objQueryModel.ConferenceCodeEqual = ConferenceCodeEqual;
            objQueryModel.UserCodeEqual       = UserCodeEqual;
            objQueryModel.TypeEqual           = TypeEqual;
            objQueryModel.UserNameEqual       = UserNameEqual;
            objQueryModel.CodeEqual           = CodeEqual;
            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    models = new ConferenceUserListBLL().GetModels(objQueryModel, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(models);
        }
Пример #2
0
        public List <ConferenceUserListModel> GetUsersAttendMeet(int meetCode)
        {
            ConferenceUserListQueryModel queryModel = new ConferenceUserListQueryModel();

            queryModel.ConferenceCodeEqual = meetCode;
            ConferenceUserListBFL tbfl = new ConferenceUserListBFL();

            return(tbfl.GetConferenceUserListList(queryModel));
        }
Пример #3
0
        private List <ConferenceUserListModel> _Select(ConferenceUserListQueryModel qmObj)
        {
            List <ConferenceUserListModel> list = new List <ConferenceUserListModel>();
            StringBuilder builder = new StringBuilder();

            builder.Append("select * from ConferenceUserList ");
            builder.Append(qmObj.QueryConditionStr);
            if (qmObj.SortColumns.Length == 0)
            {
                builder.Append(" ORDER BY Code desc");
            }
            else
            {
                builder.Append(" ORDER BY " + qmObj.SortColumns);
            }
            this._DataProcess.CommandText   = builder.ToString();
            this._DataProcess.SqlParameters = qmObj.Parameters;
            SqlDataReader sqlDataReader = null;
            int           num           = 0;

            try
            {
                try
                {
                    sqlDataReader = this._DataProcess.GetSqlDataReader();
                    while (sqlDataReader.Read())
                    {
                        if ((num >= qmObj.StartRecord) && ((list.Count < qmObj.MaxRecords) || (qmObj.MaxRecords == -1)))
                        {
                            ConferenceUserListModel model = new ConferenceUserListModel();
                            this.Initialize(sqlDataReader, model);
                            list.Add(model);
                        }
                        num++;
                    }
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            finally
            {
                if (sqlDataReader != null)
                {
                    sqlDataReader.Close();
                }
            }
            return(list);
        }
Пример #4
0
    public string GetAttendPersonList(int conferenceCode, string type)
    {
        string text = "";
        ConferenceUserListQueryModel   cmQueryModel = new ConferenceUserListQueryModel();
        ConferenceUserListBFL          culBFL       = new ConferenceUserListBFL();
        List <ConferenceUserListModel> culModel     = new List <ConferenceUserListModel>();

        cmQueryModel.ConferenceCodeEqual = conferenceCode;
        cmQueryModel.TypeEqual           = type;
        culModel = culBFL.GetConferenceUserListList(cmQueryModel);
        for (int i = 0; i < culModel.Count; i++)
        {
            text += culModel[i].UserName + "  ";
        }
        return(text);
    }
Пример #5
0
        public List <ConferenceUserListModel> GetConferenceUserListList(ConferenceUserListQueryModel QueryModel)
        {
            List <ConferenceUserListModel> models = new List <ConferenceUserListModel>();

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    if (QueryModel == null)
                    {
                        QueryModel = new ConferenceUserListQueryModel();
                    }
                    models = new ConferenceUserListBLL().GetModels(QueryModel, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(models);
        }
Пример #6
0
        public string UserListString(int meetCode)
        {
            StringBuilder builder = new StringBuilder();
            ConferenceUserListQueryModel queryModel = new ConferenceUserListQueryModel();

            queryModel.ConferenceCodeEqual = meetCode;
            List <ConferenceUserListModel> conferenceUserListList = new ConferenceUserListBFL().GetConferenceUserListList(queryModel);

            foreach (ConferenceUserListModel model2 in conferenceUserListList)
            {
                if (!model2.UserCode.Equals(string.Empty))
                {
                    builder.Append(model2.UserCode + ",");
                }
            }
            int length = builder.Length;

            if (length > 0)
            {
                builder.Remove(length - 1, 1);
            }
            return(builder.ToString());
        }
Пример #7
0
 public List <ConferenceUserListModel> Select(ConferenceUserListQueryModel qmObj)
 {
     return(this._Select(qmObj));
 }
Пример #8
0
        public List <ConferenceUserListModel> Select()
        {
            ConferenceUserListQueryModel qmObj = new ConferenceUserListQueryModel();

            return(this._Select(qmObj));
        }
Пример #9
0
        public List <ConferenceUserListModel> GetModels(ConferenceUserListQueryModel ObjQueryModel, SqlTransaction Transaction)
        {
            ConferenceUserListDAL tdal = new ConferenceUserListDAL(Transaction);

            return(tdal.Select(ObjQueryModel));
        }