public int Delete(ConferenceManageModel ObjModel) { int num = 0; using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { connection.Open(); SqlTransaction transaction = connection.BeginTransaction(); try { try { num = new ConferenceManageBLL().Delete(ObjModel.Code, transaction); transaction.Commit(); } catch (SqlException exception) { transaction.Rollback(); connection.Close(); throw exception; } return(num); } finally { connection.Close(); } } return(num); }
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); }
public ConferenceManageModel GetConferenceManage(int Code) { ConferenceManageModel model = new ConferenceManageModel(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { model = new ConferenceManageBLL().GetModel(Code, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(model); }
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); }
public List <ConferenceManageModel> GetConferenceManageListOne(int Code) { List <ConferenceManageModel> list = new List <ConferenceManageModel>(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); ConferenceManageBLL ebll = new ConferenceManageBLL(); list.Add(ebll.GetModel(Code, connection)); connection.Close(); } catch (SqlException exception) { throw exception; } } return(list); }
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); }
public string BuildQueryString(string topic, string startTime, string endTime, string dept, string place, string chaterMember) { return(ConferenceManageBLL.BuildQueryString(topic, startTime, endTime, dept, place, chaterMember)); }