Beispiel #1
0
        private void QualityManagement_Load(object sender, EventArgs e)
        {
            #region 添加应用程序
            if (this.sMain.gUserInfo.rolecaption == "系统开发员")
            {
                IList <IDictionary <string, object> > lsfunls = new List <IDictionary <string, object> >();
                FrmBLL.publicfuntion.GetFromCtls(this, ref lsfunls);
                Dictionary <string, object> dic = new Dictionary <string, object>();
                dic.Add("PROGID", this.Name);
                dic.Add("PROGNAME", this.Text);
                dic.Add("PROGDESC", this.Text);
                FrmBLL.publicfuntion.AddProgInfo(dic, lsfunls);
            }
            #endregion

            for (int i = 0; i < 24; i++)
            {
                combStime.Items.Add(i.ToString().PadLeft(2, '0') + ":30");
                combEtime.Items.Add(i.ToString().PadLeft(2, '0') + ":30");
            }

            combStime.SelectedIndex = 0; ////.Text = combStime.SelectedIndex;
            combEtime.SelectedIndex = 0; //.Text = combEtime.SelectedItem = -1;

            GetProduct = new GetProductList(GettProductList);
            GetProduct.BeginInvoke(null, null);

            GetwoId = new GetwoIdList(GettwoIdList);
            GetwoId.BeginInvoke(null, null);

            GetLine = new GetLineList(GettLineList);
            GetLine.BeginInvoke(null, null);

            GetCraft = new GetCraftList(GettCraftList);
            GetCraft.BeginInvoke(null, null);

            GetErrorCode = new GetErrorCodeList(GettErrorCode);
            GetErrorCode.BeginInvoke(null, null);

            GetReasonCode = new GetReasonCodeList(GettReasonCode);
            GetReasonCode.BeginInvoke(null, null);

            //  panelEx4.Right = panelEx3.Width * (2 / 3);
            imbt_Checktime.Left = panelEx4.Width + 150;

            #region 单元格交替颜色
            this.dgvYieldRate.RowsDefaultCellStyle.BackColor            = Color.Bisque;
            this.dgvYieldRate.AlternatingRowsDefaultCellStyle.BackColor = Color.Beige;

            this.dgvDefectAnalysis.RowsDefaultCellStyle.BackColor            = Color.Bisque;
            this.dgvDefectAnalysis.AlternatingRowsDefaultCellStyle.BackColor = Color.Beige;

            this.dgvRepairAnalysis.RowsDefaultCellStyle.BackColor            = Color.Bisque;
            this.dgvRepairAnalysis.AlternatingRowsDefaultCellStyle.BackColor = Color.Beige;
            #endregion
        }
Beispiel #2
0
        private void tabSelect_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch (this.tabSelect.SelectedIndex)
            {
            case 0:

                tbesn.Focus();
                tbesn.SelectAll();
                if ((sMain.gUserInfo.rolecaption != "产品维修") && (sMain.gUserInfo.rolecaption != "系统开发员"))
                {
                    MessageBox.Show(" 您当前的角色为: " + sMain.gUserInfo.rolecaption + "\r\n 非维修人员不能使用该页面功能 \r\n 自动跳转为查询界面");
                    tabSelect.SelectedIndex = 3;
                }

                break;

            case 1:
                tbsntorepair.Focus();
                tbsntorepair.SelectAll();
                btToRepair.Enabled = false;
                if ((sMain.gUserInfo.rolecaption != "产品维修") && (sMain.gUserInfo.rolecaption != "系统开发员"))
                {
                    MessageBox.Show(" 您当前的角色为: " + sMain.gUserInfo.rolecaption + "\r\n 非维修人员不能使用该页面功能 \r\n 自动跳转为查询界面");
                    tabSelect.SelectedIndex = 3;
                }
                break;

            case 2:

                DataRow[] ArrDr = sMain.gUserInfo.userPopList.Select(string.Format("progid='FrmRepair' and funId='{0}'", "PD_Transfer".ToUpper()));
                if ((sMain.gUserInfo.rolecaption != "生产转账") && (sMain.gUserInfo.rolecaption != "系统开发员") && (ArrDr == null || ArrDr.Length < 1))
                {
                    MessageBox.Show(" 您当前的角色为: " + sMain.gUserInfo.rolecaption + "\r\n 非生产转账人员不能使用该页面功能 \r\n 自动跳转为查询界面");
                    tabSelect.SelectedIndex = 3;
                }
                tbRepairToLine.Focus();
                tbRepairToLine.SelectAll();

                break;

            case 3:

                tbesnselect.Focus();
                tbesnselect.SelectAll();

                break;

            case 5:
                GetProduct = new GetProductList(GettProductList);
                GetProduct.BeginInvoke(null, null);

                //// ThreadGetProduct = new Thread(new ThreadStart(GettProductList));

                //ThreadGetProduct = new Thread((ThreadStart)(delegate()
                //{
                //GettProductList();
                //}));



                //ThreadGetProduct.Start();


                break;
            }
        }