Пример #1
0
        private void TestOverTimeProcess_Load(object sender, EventArgs e)
        {
            if (Yqun.Common.ContextCache.ApplicationContext.Current.IsAdministrator ||
                Yqun.Common.ContextCache.ApplicationContext.Current.UserCode.Length == 8)
            {
                bt_save.Visible = false;
            }

            if (Datas != null && Datas.Rows.Count > 0)
            {
                var type = DepositoryLabStadiumList.GetUserType(Yqun.Common.ContextCache.ApplicationContext.Current.UserCode);
                if (type == "监理")
                {
                    var row  = Datas.Rows[0];
                    var code = Convert.ToString(row["TestRoomCode"]);
                    tb_reason.ReadOnly = Yqun.Common.ContextCache.ApplicationContext.Current.InTestRoom.Code != code;
                }
            }

            SetDataSource();
        }
Пример #2
0
        private void TaskView_Load(object sender, EventArgs e)
        {
            ProgressScreen.Current.ShowSplashScreen();
            ProgressScreen.Current.SetStatus = "正在显示待做事项列表...";

            try
            {
                TestRoomCode = Yqun.Common.ContextCache.ApplicationContext.Current.InTestRoom.Code;

                string UserNodeCode = Yqun.Common.ContextCache.ApplicationContext.Current.UserCode;
                if (UserNodeCode.Length > 12)
                {
                    UserNodeCode = UserNodeCode.Substring(0, 12);
                }

                userType  = DepositoryLabStadiumList.GetUserType(UserNodeCode);
                this.Text = "待做事项列表-【" + Yqun.Common.ContextCache.ApplicationContext.Current.InSegment.Description
                            + "-" + Yqun.Common.ContextCache.ApplicationContext.Current.InCompany.Description + "-" +
                            Yqun.Common.ContextCache.ApplicationContext.Current.InTestRoom.Description + "】-" + DateTime.Now.ToString("yyyy-MM-dd");
                spread_invalide.MouseDown += new MouseEventHandler(FpSpread_MouseDown);

                BindStadium();

                Thread t = new Thread(new ParameterizedThreadStart(BindInvalid));
                t.Start(Yqun.Common.ContextCache.ApplicationContext.Current);

                Thread t2 = new Thread(new ParameterizedThreadStart(BindRequest));
                t2.Start(Yqun.Common.ContextCache.ApplicationContext.Current);

                SetOverTimeSheet();
                Thread t3 = new Thread(new ParameterizedThreadStart(BindTestOverTime));
                t3.Start(Yqun.Common.ContextCache.ApplicationContext.Current);

                tabPage1.Text = "今日到期待做试验【" + spread_stadium_sheet.RowCount + "】";
                this.除ToolStripMenuItem.Visible = false;

                if (Yqun.Common.ContextCache.ApplicationContext.Current.IsAdministrator ||
                    Yqun.Common.ContextCache.ApplicationContext.Current.UserCode.Length == 8)
                {
                    this.除ToolStripMenuItem.Visible = true;
                }

                if (Yqun.Common.ContextCache.ApplicationContext.Current.IsAdministrator ||
                    Yqun.Common.ContextCache.ApplicationContext.Current.UserCode.Length == 8)
                {
                    填写原因ToolStripMenuItem.Visible = false;
                    处理ToolStripMenuItem.Visible   = true;
                }
                else if (userType.IndexOf("监理") > 0)
                {
                    填写原因ToolStripMenuItem.Visible = false;
                    处理ToolStripMenuItem.Visible   = true;
                }
                else
                {
                    填写原因ToolStripMenuItem.Visible = true;
                    处理ToolStripMenuItem.Visible   = false;
                }

                //ShowPXJZ();
            }
            catch
            {
            }

            ProgressScreen.Current.CloseSplashScreen();
            this.Activate();
        }