private void baseSimpleButton1_Click_1(object sender, EventArgs e) { ProxyBllTEST_INFO bllTest_Info = new ProxyBllTEST_INFO(); DataSet dsTestInfo = bllTest_Info.GetListNoStart_new(); //将读取试验任务的任务编号显示在lstTaskList列表中 lstTasklist.Items.Clear(); string temptaskNo = ""; string submit = ""; string allocation = ""; if (dsTestInfo != null) { for (int i = 0; i < dsTestInfo.Tables[0].Rows.Count; i++) { temptaskNo = dsTestInfo.Tables[0].Rows[i]["F_TEST_TASK_ID"].ToString(); submit = dsTestInfo.Tables[0].Rows[i]["submit"].ToString(); allocation = dsTestInfo.Tables[0].Rows[i]["allocation"].ToString(); lstTasklist.Items.Add(temptaskNo); } } }
/// <summary> /// query data from database and bind to gridview /// </summary> private void BindGridview() { /*20170608MODIFY 试验任务列表信息通过视图显示,提高列表显示速度 * //读取未开始的试验任务 * ProxyBllTEST_INFO bllTest_Info = new ProxyBllTEST_INFO(); * DataSet dsTestInfo = bllTest_Info.GetListNoStart(); * //将读取试验任务的任务编号、试验状态显示在lstTaskList列表中 * lstTasklist.Items.Clear(); * string temptaskNo = ""; * if (dsTestInfo != null) * { * for (int i = 0; i < dsTestInfo.Tables[0].Rows.Count; i++) * { * temptaskNo = dsTestInfo.Tables[0].Rows[i]["F_TEST_TASK_ID"].ToString(); * * //判断temptaskNo任务编号的数据在试验任务数据文件中是否存在,如果存在,表示该任务已提交 * //否则该任务为已保存未提交状态 * ProxyBllTESINFODB bllTestDB = new ProxyBllTESINFODB(); * DataSet dsTaskId = bllTestDB.GetList(" F_TEST_TASK_ID='" + temptaskNo + "' "); * if (dsTaskId == null || dsTaskId.Tables[0].Rows.Count == 0) * { * //lstTasklist.Items.Add(temptaskNo + "_未提交"); * ProxyBllTEST_ALLOCATION bllTestAllocation = new ProxyBllTEST_ALLOCATION(); * dsTaskId = bllTestAllocation.GetList(" F_TEST_TASK_ID='" + temptaskNo + "' and F_SAMPLE_STATUS<>11 "); * { * if (dsTaskId == null || dsTaskId.Tables[0].Rows.Count == 0) * { * lstTasklist.Items.Add(temptaskNo + "_未提交_未分配"); * } * else * { * lstTasklist.Items.Add(temptaskNo + "_未提交_已分配"); * } * } * } * else * { * ProxyBllTEST_ALLOCATION bllTestAllocation = new ProxyBllTEST_ALLOCATION(); * dsTaskId = bllTestAllocation.GetList(" F_TEST_TASK_ID='" + temptaskNo + "' and F_SAMPLE_STATUS<>11 "); * { * if (dsTaskId == null || dsTaskId.Tables[0].Rows.Count == 0) * { * lstTasklist.Items.Add(temptaskNo + "_已提交_未分配"); * } * else * { * lstTasklist.Items.Add(temptaskNo + "_已提交_已分配"); * } * } * } * } * }*/ //20170608MODIFY 试验任务列表信息通过视图显示,提高列表显示速度 end ProxyBllTEST_INFO bllTest_Info = new ProxyBllTEST_INFO(); DataSet dsTestInfo = bllTest_Info.GetListNoStart_new(); //将读取试验任务的任务编号显示在lstTaskList列表中 lstTasklist.Items.Clear(); string temptaskNo = ""; string submit = ""; string allocation = ""; if (dsTestInfo != null) { for (int i = 0; i < dsTestInfo.Tables[0].Rows.Count; i++) { temptaskNo = dsTestInfo.Tables[0].Rows[i]["F_TEST_TASK_ID"].ToString(); submit = dsTestInfo.Tables[0].Rows[i]["submit"].ToString(); allocation = dsTestInfo.Tables[0].Rows[i]["allocation"].ToString(); lstTasklist.Items.Add(temptaskNo); } } //清空中间显示列表 lstTempDisList.Items.Clear(); //将读取t_test_info_nodisplay表,将任务编号显示在lstTaskNoDisList列表中 lstTaskNoDisList.Items.Clear(); dsTestInfo = bllTest_Info.GetListNoDisplay(""); if (dsTestInfo != null) { for (int i = 0; i < dsTestInfo.Tables[0].Rows.Count; i++) { temptaskNo = dsTestInfo.Tables[0].Rows[i]["F_TEST_TASK_ID"].ToString(); lstTaskNoDisList.Items.Add(temptaskNo); } } }