Example #1
0
        void GetProcess()
        {
            soDictionary = SortingProgress.GetSortingProcessInfo(taskdate, taskno, SortingLine.GetNonSortingLineCode());
            foreach (Control control in panelEx3.Controls)
            {
                if (control is PanelEx)
                {
                    var panelex = (PanelEx)control as PanelEx;
                    if (panelex.Tag != null)
                    {
                        try
                        {
                            panelex.Text = soDictionary[panelex.Tag.ToString()];
                        }
                        catch (Exception)
                        {
                        }
                    }
                }
            }

            panelEx4.Text = "目标分拣效率15000条/小时,今日平均分拣效率" + soDictionary["EFFICIENCY"];

            panelEx10.Text = "分拣效率  " + soDictionary["EFFICIENCY"];

            progressBarX1.Text    = soDictionary["QTY_PRODUCT"] + "/" + soDictionary["QTY_PRODCUT_TOT"] + "条 - " + soDictionary["Progress"] + "%";
            progressBarX1.Maximum = Convert.ToInt32(soDictionary["QTY_PRODCUT_TOT"]);
            progressBarX1.Value   = Convert.ToInt32(soDictionary["QTY_PRODUCT"]);
        }
Example #2
0
        public void SaveSortingTaskProcess(string plctaskid)
        {
            SortingTaskProgress sortingTaskProgress = null;

            sortingTaskProgress = SortingTaskProgress.GetSortingTaskProgress(ID);

            if (Status == 0)
            {
                sortingTaskProgress.STATUS      = Status;
                sortingTaskProgress.SORTINGTIME = null;
                sortingTaskProgress.FINISHTIME  = null;
                sortingTaskProgress.PLCAddress  = PLCADDRESS;
                sortingTaskProgress.ISLOCK      = ISLOCK;
                if (sortingTaskProgress != null)
                {
                    sortingTaskProgress.Save();
                }
            }
            if (Status == 1)
            {
                sortingTaskProgress.STATUS      = 1;
                sortingTaskProgress.SORTINGTIME = DateTime.Now;
                sortingTaskProgress.FINISHTIME  = null;
                sortingTaskProgress.PLCAddress  = PLCADDRESS;
                sortingTaskProgress.ISLOCK      = ISLOCK;
                if (sortingTaskProgress != null)
                {
                    sortingTaskProgress.Save();
                }
            }
            if (Status == 2)

            {
                sortingTaskProgress.STATUS = Status;
                if (sortingTaskProgress.SORTINGTIME == null)
                {
                    sortingTaskProgress.SORTINGTIME = DateTime.Now;
                }
                sortingTaskProgress.FINISHTIME = DateTime.Now;
                sortingTaskProgress.PLCAddress = PLCADDRESS;
                sortingTaskProgress.ISLOCK     = ISLOCK;
                if (sortingTaskProgress != null)
                {
                    sortingTaskProgress.Save();
                }
            }

            //重汇分拣进度
            try
            {
                Thread thread1 = new Thread(new ParameterizedThreadStart(SortingProcessList.GetSortingProcessList));
                //Thread thread2 = new Thread(SortingProcessList.UpdateEfficincy);
                thread1.Start(SortingLine.GetNonSortingLineCode());
                //thread2.Start();
            }
            catch (Exception)
            {
            }
        }
Example #3
0
        public CSortingTask()
        {
            InitializeComponent();

            this.SetStyle(
                ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer, true);
            Dock           = DockStyle.Fill;
            taskStatus     = TaskStatus.Stop;
            dataGridViewXs = new Dictionary <string, DataGridViewX>();
            dataGridViewXs.Add("superTabItem1", dgviewnone);
            dataGridViewXs.Add("superTabItem3", dgvIssued);
            dataGridViewXs.Add("superTabItem2", dgviewfin);

            //合计使用
            //1.构造中绑定需要合计的列
            //2.绑定数据后调用合计方法
            //3.滚动条事件中重绘合计
            footSumLabel3.Init(dgviewnonedetail, new Dictionary <string, int>()
            {
                { "qTYDataGridViewTextBoxColumn", 0 }
            });
            footSumLabel1.Init(dgvIssueddetail, new Dictionary <string, int>()
            {
                { "qTYDataGridViewTextBoxColumn2", 0 }
            });
            footSumLabel2.Init(dgviewfindetail, new Dictionary <string, int>()
            {
                { "qTYDataGridViewTextBoxColumn4", 0 }
            });



            //SocketCommunication.SocketManager.Instance.EV_SendBoxSuccessed += new EventHandler<SocketCommunication.SortingTaskEventArgs>(Instance_EV_SendBoxSuccessed);

            Thread thread = new Thread(new ParameterizedThreadStart(SortingProcessList.GetSortingProcessList));

            thread.Start(SortingLine.GetNonSortingLineCode());
        }
Example #4
0
File: CBox.cs Project: wg3281/JZFJ
 public void LoadCigBox()
 {
     if (chkisall.Checked)
     {
         CigBoxInfoList cigBoxInfoList = CigBoxInfoList.GetNonCigBoxList(new QueryCondition("0", true, SortingLine.GetNonSortingLineCode(), "desc"));
         dgviewnone.DataSource = cigBoxInfoList;
         dgviewfin.DataSource  = CigBoxInfoList.GetFinCigBoxList(new QueryCondition("2", true, SortingLine.GetNonSortingLineCode(), "desc"));
     }
     else
     {
         dgviewnone.DataSource = CigBoxInfoList.GetNonCigBoxList(new QueryCondition("0", false, SortingLine.GetNonSortingLineCode(), "desc"));
         dgviewfin.DataSource  = CigBoxInfoList.GetFinCigBoxList(new QueryCondition("2", false, SortingLine.GetNonSortingLineCode(), "desc"));
     }
     footSumLabel1.Sumdata();
     footSumLabel2.Sumdata();
 }