Ejemplo n.º 1
0
        public List <ConferenceManageModel> GetConferenceManageList(string SortColumns, int StartRecord, int MaxRecords, int CodeEqual, string TopicEqual, string ChaterMemberEqual, string TypeEqual, string PlaceEqual, string DeptEqual, DateTime StartTimeEqual, DateTime EndTimeEqual, string RemarkEqual, string StateEqual)
        {
            List <ConferenceManageModel> models        = new List <ConferenceManageModel>();
            ConferenceManageQueryModel   objQueryModel = new ConferenceManageQueryModel();

            objQueryModel.StartRecord       = StartRecord;
            objQueryModel.MaxRecords        = MaxRecords;
            objQueryModel.SortColumns       = SortColumns;
            objQueryModel.CodeEqual         = CodeEqual;
            objQueryModel.TopicEqual        = TopicEqual;
            objQueryModel.ChaterMemberEqual = ChaterMemberEqual;
            objQueryModel.TypeEqual         = TypeEqual;
            objQueryModel.PlaceEqual        = PlaceEqual;
            objQueryModel.DeptEqual         = DeptEqual;
            objQueryModel.StartTimeEqual    = StartTimeEqual;
            objQueryModel.EndTimeEqual      = EndTimeEqual;
            objQueryModel.RemarkEqual       = RemarkEqual;
            objQueryModel.StateEqual        = StateEqual;
            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    models = new ConferenceManageBLL().GetModels(objQueryModel, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(models);
        }
Ejemplo n.º 2
0
        public List <ConferenceManageModel> GetSearchResultConferenceList(string strQuery)
        {
            List <ConferenceManageModel> list       = new List <ConferenceManageModel>();
            ConferenceManageQueryModel   queryModel = new ConferenceManageQueryModel();

            queryModel.QueryConditionStr = strQuery;
            return(this.GetConferenceManageList(queryModel));
        }
Ejemplo n.º 3
0
        public List <ConferenceManageModel> GetADayMeet(DateTime dt)
        {
            ConferenceManageBFL           ebfl           = new ConferenceManageBFL();
            Dictionary <string, DateTime> dayBeginAndEnd = this.GetDayBeginAndEnd(dt);
            ConferenceManageQueryModel    queryModel     = new ConferenceManageQueryModel();

            queryModel.WeekStartTimeEqual = dayBeginAndEnd["DateBegin"];
            queryModel.WeekEndTimeEqual   = dayBeginAndEnd["DateEnd"];
            queryModel.StateEqual         = MeetStateType.Authored.ToString();
            return(ebfl.GetConferenceManageList(queryModel));
        }
Ejemplo n.º 4
0
        public ConferenceManageQueryModel SetConferenceQueryModel(DateTime dtTime)
        {
            ConferenceManageQueryModel model = new ConferenceManageQueryModel();

            DateTime[] weekBeginAndEndDate = this.GetWeekBeginAndEndDate(dtTime.Date);
            DateTime   time  = weekBeginAndEndDate[0];
            DateTime   time2 = weekBeginAndEndDate[1];

            model.WeekStartTimeEqual = time;
            model.WeekEndTimeEqual   = time2;
            model.StateEqual         = MeetStateType.Authored.ToString();
            return(model);
        }
Ejemplo n.º 5
0
        private List <ConferenceManageModel> _Select(ConferenceManageQueryModel qmObj)
        {
            List <ConferenceManageModel> list = new List <ConferenceManageModel>();
            StringBuilder builder             = new StringBuilder();

            builder.Append("select * from ConferenceManage ");
            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)))
                        {
                            ConferenceManageModel model = new ConferenceManageModel();
                            this.Initialize(sqlDataReader, model);
                            list.Add(model);
                        }
                        num++;
                    }
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            finally
            {
                if (sqlDataReader != null)
                {
                    sqlDataReader.Close();
                }
            }
            return(list);
        }
Ejemplo n.º 6
0
        public List <ConferenceManageModel> GetWeekConferenceList(DateTime dtTime)
        {
            List <ConferenceManageModel> models = new List <ConferenceManageModel>();

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                ConferenceManageQueryModel objQueryModel = this.SetConferenceQueryModel(dtTime);
                try
                {
                    connection.Open();
                    models = new ConferenceManageBLL().GetModels(objQueryModel, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(models);
        }
Ejemplo n.º 7
0
        public List <ConferenceManageModel> GetConferenceManageList(ConferenceManageQueryModel QueryModel)
        {
            List <ConferenceManageModel> models = new List <ConferenceManageModel>();

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    if (QueryModel == null)
                    {
                        QueryModel = new ConferenceManageQueryModel();
                    }
                    models = new ConferenceManageBLL().GetModels(QueryModel, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(models);
        }
Ejemplo n.º 8
0
        public List <ConferenceManageModel> GetModels(ConferenceManageQueryModel ObjQueryModel, SqlTransaction Transaction)
        {
            ConferenceManageDAL edal = new ConferenceManageDAL(Transaction);

            return(edal.Select(ObjQueryModel));
        }
Ejemplo n.º 9
0
 public List <ConferenceManageModel> Select(ConferenceManageQueryModel qmObj)
 {
     return(this._Select(qmObj));
 }
Ejemplo n.º 10
0
        public List <ConferenceManageModel> Select()
        {
            ConferenceManageQueryModel qmObj = new ConferenceManageQueryModel();

            return(this._Select(qmObj));
        }