Esempio n. 1
0
        /// <summary>
        /// 绑定StoreTasks数据源
        /// </summary>

        private void LoadData(string where)
        {
            //List<WSS.Model.Tasks> list = new WSS.BLL.Tasks().GetModelList(where);


            //this.StoreTasks.DataSource = list;
            //this.StoreTasks.DataBind();


            //List<WSS.Model.Dictionary> lisd = new WSS.BLL.Dictionary().GetModelList("F_ParentID=100100 or F_ParentID=100101 ");
            //StoreDic.DataSource = lisd;
            //StoreDic.DataBind();



            AllOther.ComboBoxDic(cbFrom, "100103");
            AllOther.ComboBoxDic(cbJinjiLevel, "100104");
            AllOther.ComboBoxDic(cbGameName, "100102");
            AllOther.ComboBoxDic(cbType, "100101");
            AllOther.ComboBoxUser(cbDutyMan, "1=1");
        }
        private void LoadData(string where)// 绑定StoreTasks数据源
        {
            where += " order by f_datetime desc";
            List <WSS.Model.Tasks> list = new WSS.BLL.Tasks().GetModelList(where);

            foreach (WSS.Model.Tasks ts in list)
            {
                if (ts.F_Note.Length > 25)
                {
                    ts.F_Note = Server.HtmlDecode(ts.F_Note.Substring(0, 25));
                }
            }

            this.StoreTasks.DataSource = list;
            this.StoreTasks.DataBind();


            List <WSS.Model.Dictionary> lisd = new WSS.BLL.Dictionary().GetModelList("F_ParentID=100100 or F_ParentID=100101 ");

            StoreDic.DataSource = lisd;
            StoreDic.DataBind();



            AllOther.ComboBoxDic(cbFrom, "100103");
            AllOther.ComboBoxDic(cbJinjiLevel, "100104");
            AllOther.ComboBoxDic(cbGameName, "100102");
            AllOther.ComboBoxDic(cbType, "100101");
            AllOther.ComboBoxDic(cbstate, "100100");
            AllOther.ComboBoxUser(cbDutyMan, "1=1");

            cbFrom.SelectedIndex              = 0;
            cbJinjiLevel.SelectedIndex        = 0;
            cbGameName.SelectedIndex          = 0;
            cbstate.SelectedIndex             = 0;
            GridPanelNewsList.SelectionMemory = SelectionMemoryMode.Auto;
            RowSelectionModel sm = this.GridPanelNewsList.SelectionModel.Primary as RowSelectionModel;

            sm.ClearSelections();
        }
        /// <summary>
        /// 检查机器人故障,这里只有机器人1和2的,机器人3的因为只有一个故障在cDataRead里面
        /// </summary>
        /// <param name="e0"></param>
        /// <param name="e1"></param>
        public void CheckRoobetError(AllOther space, ushort e0, ushort e1)
        {
            bool[] oldBool;
            bool[] newBool;
            switch (space)
            {
            case AllOther.机器人1:
                oldBool = All.Class.Num.Ushort2Bool(All.Class.Num.SwitchHighAndLow(this.E0));
                newBool = All.Class.Num.Ushort2Bool(All.Class.Num.SwitchHighAndLow(e0));
                for (int i = 0; i < this.MachineOneError.Length; i++)
                {
                    if (oldBool[i] != newBool[i])
                    {
                        if (newBool[i])
                        {
                            if (frmMain.mMain.AllDataXml.ErrorShow.Show(FlushAllError.SpaceList.机器人))
                            {
                                frmMain.mMain.FlushInfo.Change(new cFlushInfo.Info(string.Format("1#机器人{0}", this.MachineOneError[i]), FlushAllError.ChangeList.Add));
                            }
                            frmMain.mMain.FlushAllError.Change(FlushAllError.SpaceList.机器人, 1, this.MachineOneError[i], FlushAllError.ChangeList.Add, cSheBei.GetMachineIndexForAllError(FlushAllError.SpaceList.机器人, 1));
                        }
                        if (oldBool[i])
                        {
                            frmMain.mMain.FlushInfo.Change(new cFlushInfo.Info(string.Format("1#机器人{0}", this.MachineOneError[i]), FlushAllError.ChangeList.Del));
                            frmMain.mMain.FlushAllError.Change(FlushAllError.SpaceList.机器人, 1, this.MachineOneError[i], FlushAllError.ChangeList.Del, cSheBei.GetMachineIndexForAllError(FlushAllError.SpaceList.机器人, 1));
                        }
                    }
                }
                this.E0 = e0;
                break;

            case AllOther.机器人2:
                ushort[] allError = new ushort[2];
                allError[0] = All.Class.Num.SwitchHighAndLow(this.E0);
                allError[1] = All.Class.Num.SwitchHighAndLow(this.E1);
                oldBool     = All.Class.Num.Ushort2Bool(allError);
                allError[0] = All.Class.Num.SwitchHighAndLow(e0);
                allError[1] = All.Class.Num.SwitchHighAndLow(e1);
                newBool     = All.Class.Num.Ushort2Bool(allError);
                for (int i = 0; i < this.MachineTwoError.Length; i++)
                {
                    if (oldBool[i] != newBool[i])
                    {
                        if (newBool[i])
                        {
                            if (frmMain.mMain.AllDataXml.ErrorShow.Show(FlushAllError.SpaceList.机器人))
                            {
                                frmMain.mMain.FlushInfo.Change(new cFlushInfo.Info(string.Format("2#机器人{0}", this.MachineTwoError[i]), FlushAllError.ChangeList.Add));
                            }
                            frmMain.mMain.FlushAllError.Change(FlushAllError.SpaceList.机器人, 2, this.MachineTwoError[i], FlushAllError.ChangeList.Add, cSheBei.GetMachineIndexForAllError(FlushAllError.SpaceList.机器人, 2));
                        }
                        if (oldBool[i])
                        {
                            if (frmMain.mMain.AllDataXml.ErrorShow.Show(FlushAllError.SpaceList.机器人))
                            {
                                frmMain.mMain.FlushInfo.Change(new cFlushInfo.Info(string.Format("2#机器人{0}", this.MachineTwoError[i]), FlushAllError.ChangeList.Del));
                            }
                            frmMain.mMain.FlushAllError.Change(FlushAllError.SpaceList.机器人, 2, this.MachineTwoError[i], FlushAllError.ChangeList.Del, cSheBei.GetMachineIndexForAllError(FlushAllError.SpaceList.机器人, 2));
                        }
                    }
                }
                this.E0 = e0;
                this.E1 = e1;
                break;
            }
        }