public MasterCheckListInCollection GetMasterCheckListInColl(DateTime dtCreated) { MasterCheckListInCollection ins = null; string str = dtCreated.Year.ToString() + "-" + dtCreated.Month.ToString() + "-" + dtCreated.Day.ToString() + " 00:00:00"; if (this.TryConnection()) { DatabaseParameters parameters = new DatabaseParameters(); string str2 = "SELECT master_checklist.* FROM master_checklist, master_checklist_type WHERE master_checklist_type.internal_id = checklist_type AND dt_created >= CAST('" + str + "' AS DATETIME)"; DataTable table = base.CurDBEngine.SelectQuery(base.CurSQLFactory.SQL); if (table != null) { ins = new MasterCheckListInCollection(); foreach (DataRow row in table.Rows) { MasterCheckList list = new MasterCheckList(row[this.DataStructrure.Tables.MasterCheckList.InternalID.ActualFieldName].ToString()) { checklist_question = row[this.DataStructrure.Tables.MasterCheckList.ChecklistQuestion.ActualFieldName].ToString(), checklist_type = row[this.DataStructrure.Tables.MasterCheckList.CheckListType.ActualFieldName].ToString(), checklist_active = row[this.DataStructrure.Tables.MasterCheckList.CheckListActive.ActualFieldName].ToString(), checklist_seq = row[this.DataStructrure.Tables.MasterCheckList.CheckListSeq.ActualFieldName].ToString() }; ins.Add(list); } return(ins); } base.error_occured = true; base.ErrMsg = "[MasterCheckListManager] : GetMasterCheckListInColl : " + base.CurDBEngine.ErrorMessage; return(ins); } base.error_occured = true; base.ErrMsg = "[MasterCheckListManager] : GetMasterCheckListInColl : " + base.ErrMsg; return(ins); }
public MasterCheckListInCollection GetMasterCheckListInColl() { MasterCheckListInCollection ins = null; if (this.TryConnection()) { DatabaseParameters parameters = new DatabaseParameters(); base.CurSQLFactory.SelectCommand(parameters, this.DataStructrure.Tables.MasterCheckList.ActualTableName); DataTable table = base.CurDBEngine.SelectQuery(base.CurSQLFactory.SQL); if (table != null) { ins = new MasterCheckListInCollection(); foreach (DataRow row in table.Rows) { MasterCheckList list = new MasterCheckList(row[this.DataStructrure.Tables.MasterCheckList.InternalID.ActualFieldName].ToString()) { checklist_question = row[this.DataStructrure.Tables.MasterCheckList.ChecklistQuestion.ActualFieldName].ToString(), checklist_type = row[this.DataStructrure.Tables.MasterCheckList.CheckListType.ActualFieldName].ToString(), checklist_active = row[this.DataStructrure.Tables.MasterCheckList.CheckListActive.ActualFieldName].ToString(), checklist_seq = row[this.DataStructrure.Tables.MasterCheckList.CheckListSeq.ActualFieldName].ToString() }; ins.Add(list); } return(ins); } base.error_occured = true; base.ErrMsg = "[MasterCheckListManager] : GetMasterCheckListInColl : " + base.CurDBEngine.ErrorMessage; return(ins); } base.error_occured = true; base.ErrMsg = "[MasterCheckListManager] : GetMasterCheckListInColl : " + base.ErrMsg; return(ins); }