示例#1
0
        private void OnRefreshWMSDt()
        {
            CtlDBAccess.BLL.MainControlTaskBll            mainTaskBll  = new CtlDBAccess.BLL.MainControlTaskBll();
            List <CtlDBAccess.Model.MainControlTaskModel> mainTaskList = mainTaskBll.GetModelList("TaskStatus='待启动' or TaskStatus='已启动' or TaskStatus='待执行' or TaskStatus='执行中' ");
            DataTable dt = (this.dataGridView1.DataSource as DataTable).Clone();

            foreach (CtlDBAccess.Model.MainControlTaskModel mainTask in mainTaskList)
            {
                DataRow dr = dt.Rows.Add();
                dr["管理任务ID"] = mainTask.WMSTaskID;
                dr["任务类型"]   = mainTask.TaskType;
                dr["任务状态"]   = mainTask.TaskStatus;
                dr["托盘码"]    = mainTask.PalletCode;
                dr["起始设备号"]  = mainTask.StDevice;
                dr["起始设备类型"] = mainTask.StDeviceCata;
                dr["目标设备类型"] = mainTask.EndDeviceCata;
                dr["起始设备参数"] = mainTask.StDeviceParam;
                dr["目标设备号"]  = mainTask.EndDevice;
                dr["任务创建时间"] = mainTask.CreateTime.ToString("yyyy-MM-dd HH:mm:ss");
                dr["目标设备参数"] = mainTask.EndDeviceParam;

                dr["备注"] = "";
            }
            this.dataGridView1.DataSource = dt;
        }
示例#2
0
 private bool NodeLockedBytask(FlowCtlBaseModel.CtlNodeBaseModel curNode, string mainTaskCata)
 {
     foreach (string pathKey in wcsPathMap.Keys)
     {
         FlowCtlBaseModel.WCSFlowPathModel wcsPath = wcsPathMap[pathKey];
         if (wcsPath.PathCata != mainTaskCata)
         {
             continue;
         }
         if (!wcsPath.ContainNode(curNode.NodeID))
         {
             continue;
         }
         List <CtlDBAccess.Model.MainControlTaskModel> taskList = mainCtlTaskBll.GetModelList(string.Format("FlowPathKey ='{0}' and TaskStatus='执行中'", pathKey));
         if (taskList != null && taskList.Count() > 0)
         {
             return(true);
         }
     }
     return(false);
 }