예제 #1
0
 private void OKbutton_Click(object sender, EventArgs e)
 {
     if (radioTypical.Checked == true)
         x = radioType.typical;
     else if (radioSimplified.Checked == true)
         x = radioType.simplified;
     else if (radioEEP7M.Checked == true)
         x = radioType.EEP7m;
     else if (radioEEP2006.Checked)
         x = radioType.EEP2006m;
     else if (radioWorkFlow.Checked)
         x = radioType.WorkFlow;
     else if (radioEEPCloudSystemTable.Checked)
         x = radioType.EEPCloud;
 }
예제 #2
0
        public void ShowList(radioType type)
        {
            JhList = new List <GridVrid>();
            Finish = new List <int>();
            for (int i = 0; i < Rwlist.Length; i++)
            {
                switch (type)
                {
                case radioType.all:
                {
                    GridVrid node = new GridVrid();
                    node.Th   = Rwlist[i].TH;
                    node.Pfdh = Rwlist[i].PFDH;
                    node.Xfpc = Rwlist[i].XFPC;
                    node.Xfcd = Rwlist[i].XFCDNAME;
                    if (string.IsNullOrEmpty(Rwlist[i].TLSJ))
                    {
                        node.Tlsj = Rwlist[i].TLSJ;
                    }
                    else
                    {
                        node.Tlsj = Convert.ToDateTime(Rwlist[i].TLSJ).ToString("HH:mm");
                    }
                    //node.Gyspc = Rwlist[i].GYSPC;
                    Finish.Add(Rwlist[i].ISACTION);
                    JhList.Add(node);
                }
                break;

                case radioType.finish:
                {
                    if (Rwlist[i].ISACTION >= 1)
                    {
                        GridVrid node = new GridVrid();
                        node.Th   = Rwlist[i].TH;
                        node.Pfdh = Rwlist[i].PFDH;
                        node.Xfpc = Rwlist[i].XFPC;
                        node.Xfcd = Rwlist[i].XFCDNAME;
                        //node.Gyspc = Rwlist[i].GYSPC;
                        if (string.IsNullOrEmpty(Rwlist[i].TLSJ))
                        {
                            node.Tlsj = Rwlist[i].TLSJ;
                        }
                        else
                        {
                            node.Tlsj = Convert.ToDateTime(Rwlist[i].TLSJ).ToString("HH:mm");
                        }
                        Finish.Add(Rwlist[i].ISACTION);
                        JhList.Add(node);
                    }
                }
                break;

                case radioType.unfinish:
                {
                    if (Rwlist[i].ISACTION == 0)
                    {
                        GridVrid node = new GridVrid();
                        node.Th   = Rwlist[i].TH;
                        node.Pfdh = Rwlist[i].PFDH;
                        node.Xfpc = Rwlist[i].XFPC;
                        node.Xfcd = Rwlist[i].XFCDNAME;
                        //node.Gyspc = Rwlist[i].GYSPC;
                        if (string.IsNullOrEmpty(Rwlist[i].TLSJ))
                        {
                            node.Tlsj = Rwlist[i].TLSJ;
                        }
                        else
                        {
                            node.Tlsj = Convert.ToDateTime(Rwlist[i].TLSJ).ToString("HH:mm");
                        }

                        Finish.Add(Rwlist[i].ISACTION);
                        JhList.Add(node);
                    }
                }
                break;

                default:
                    break;
                }
            }

            jldataGridView.DataSource = JhList;
            jldataGridView.Columns[q(Msg_Type.fieldwczt)].DefaultCellStyle.BackColor = Color.Red;//"完成状态"
            for (int i = 0; i < Finish.Count; i++)
            {
                if (Finish[i] >= 1)
                {
                    jldataGridView.Rows[i].Cells[q(Msg_Type.fieldwczt)].Style.BackColor = Color.FromArgb(187, 255, 102);//"完成状态"
                }
            }
            jldataGridView.Columns[q(Msg_Type.fieldwczt)].DisplayIndex = 5; //"完成状态"
            jldataGridView.Columns[q(Msg_Type.fieldxfcd)].DisplayIndex = 2; //"锌粉产地"

            if (type == radioType.all)
            {
                int index = Rwlist.ToList().FindIndex(p => p.ISACTION == 0);

                if (index != -1)
                {
                    jldataGridView.CurrentCell = jldataGridView.Rows[Index].Cells[0];
                }
            }
            jldataGridView.ClearSelection();
            SMtextBox.Select();
        }