protected void Page_Load(object sender, EventArgs e)
        {
            Response.Buffer = true;
            Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1);
            Response.Expires = 0;
            Response.CacheControl = "no-cache";
            try
            {
                StimulationCheck stimuche = StimulationCheck.getNew();
                string SQLWhere = "StimulatedType='2' and StimulationId='" + stimuche.Id + "'";
                stimtype = StimulationType.SelecByWhere(SQLWhere);
                stimuappexist = StimulationAppliction.GetStimuAppWhere("StimulationAndTypeId='" + stimtype.Id + "'");
                if (!IsPostBack)
                {
                    this.SubmitApp.Attributes.Add("onclick", "javascript:return checkfill()");
                    BindPage();

                }
            }
            catch
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script type='text/javascript'>alert('页面加载错误!将返回网站主页');window.location = '../../Home.aspx'</script>");
                return;
            }
        }
 protected void DeleApp_Click(object sender, EventArgs e)
 {
     StimulationCheck stimuche = StimulationCheck.getNew();
     string SQLWhere = "StimulatedType='3' and StimulationId='" + stimuche.Id + "'";
     stimtype = StimulationType.SelecByWhere(SQLWhere);
     stiforsub_coop = StimulationApplicationForSubCenterAndCollaborateUnit.FindUnitNewestAppforSub_Coop(stimtype.Id, u.UnitID);
     StimulationAppliction stiappexist = StimulationAppliction.Load(stiforsub_coop.Id);
     stiappexist.Deleted();
     stiforsub_coop.Deleted();
     Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script type='text/javascript'>alert('成功删除考评申请记录!');window.location = 'StimuFP.aspx'</script>");
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Buffer = true;
            Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1);
            Response.Expires = 0;
            Response.CacheControl = "no-cache";
            try
            {
                SetID = Request.QueryString["SetID"];

                System.Guid Setid = System.Guid.Empty;
                if (SetID != null && CY.Utility.Common.StringUtility.IsGuid(SetID.ToString()) && (Setid = new Guid(SetID.ToString())) != System.Guid.Empty)
                {
                    CY.CSTS.Core.Business.MACHINESET mset = CY.CSTS.Core.Business.MACHINESET.Load(Setid);
                    if (mset != null)
                    {
                        if (mset.JointreviewStateName == "未申请")
                        {
                            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "", "<script type='text/javascript'>alert('未申请');this.close();</script>");
                            return;
                        }
                        if (mset.UnitID != null)
                        {
                            IList<CY.CSTS.Core.Business.User> users = CY.CSTS.Core.Business.User.GetUnitUserList(mset.UnitID);
                            for (int i = 0; i < users.Count; i++)
                            {
                                if (users[i].UserType == 6 || users[i].UserType == 7)
                                {
                                    lbUserName.Text = users[i].Name;
                                    lbUserTel.Text = users[i].Phone;
                                    break;
                                }

                            }
                        }
                    }
                    else
                    {
                        Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "", "<script type='text/javascript'>alert('未申请');window.location = 'StimuFP.aspx';</script>");
                        return;
                    }
                }

                StimulationCheck stimuche = StimulationCheck.getNew();
                string sqlwhere = "StimulationId='" + stimuche.Id.ToString() + "' and [StimulatedType]='1'";
                stimtype = StimulationType.SelecByWhere(sqlwhere);
                stiforcrew = StimulationApplicationForCrew.FindMachineGroupNewestAppforCrew(stimtype.Id, SetID);
                if (stiforcrew != null)
                {
                    CY.CSTS.Core.Business.MACHINESET mset = CY.CSTS.Core.Business.MACHINESET.Load(stiforcrew.CrewId);
                    if (mset != null)
                    {
                        lbSetName.Text = mset.SETNAME;
                        lbUnit.Text = mset.Unit.UnitName;
                        lbInsCode.Text = mset.InsSysCode.ToString();
                        lbSetLinkman.Text = mset.LINKMAN;
                        lbTel.Text = mset.PHONE;
                    }
                    //获取附件
                    attachmentList = CY.CSTS.Core.Business.Annex.SelectAnnexByContentID(stiforcrew.Id);
                }

                if (!IsPostBack)
                {

                    if (Session["User"] != null)
                    {

                        BindPage();
                    }

                }

            }
            catch (Exception ex)
            {
                //Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script type='text/javascript'>alert('页面加载错误!将返回网站主页');window.location = '../../home.aspx'</script>");
                //return;
                throw ex;
            }
        }
            static StimulationType()
            {
                AssistUnit = new StimulationType() { cate = 0, name = "协助单位" };

                SubCenter = new StimulationType() { cate = 1, name = "分中心" };

                Center = new StimulationType() { cate = 2, name = "中心" };

                EquipSet = new StimulationType() { cate = 3, name = "机组" };
            }
Example #5
0
        private DataSet HandMachine(DataSet manchineDS, StimulationType stimulationType)
        {
            manchineDS.Tables[0].Columns.Add("Apply");
            manchineDS.Tables[0].Columns.Add("View");

            for (int i = 0; i < manchineDS.Tables[0].Rows.Count; i++)
            {

                try
                {

                    string MachineID = manchineDS.Tables[0].Rows[i]["Id"].ToString();
                    StimulationApplicationForCrew stiappforcrew = StimulationApplicationForCrew.FindMachineGroupNewestAppforCrew(stimulationType.Id, MachineID);
                    if (stimulationType.State == 2)
                    {
                        if (stiappforcrew != null)
                        {
                            manchineDS.Tables[0].Rows[i]["View"] = "true";
                            manchineDS.Tables[0].Rows[i]["Apply"] = "false";
                        }
                        else
                        {
                            manchineDS.Tables[0].Rows[i]["View"] = "false";
                            manchineDS.Tables[0].Rows[i]["Apply"] = "true";
                        }
                    }
                    else
                    {
                        if (stiappforcrew != null)
                        {
                            manchineDS.Tables[0].Rows[i]["View"] = "true";
                            manchineDS.Tables[0].Rows[i]["Apply"] = "false";
                        }
                        else
                        {
                            manchineDS.Tables[0].Rows[i]["View"] = "false";
                            manchineDS.Tables[0].Rows[i]["Apply"] = "false";
                        }
                    }

                }
                catch (Exception ex)
                {

                }

            }
            return manchineDS;
        }
Example #6
0
        private void BindBtn(StimulationType stimulationType, int StimulatedType)
        {
            StimulationAppliction stimuappexist = new StimulationAppliction();
            switch (StimulatedType)
            {
                case 1:
                    try
                    {
                        bindSetGv();
                        //DataSet manchineDS = CY.Utility.Common.ListToDS.ToDataSet(manchinelist);
                        //manchineDS = HandMachine(manchineDS, stimulationType);
                        //this.RpMachinegroup.DataSource = manchineDS;
                        //this.RpMachinegroup.DataBind();

                    }
                    catch
                    {
                        clickenable = "false";
                    }

                    break;

                case 2: stimuappexist = StimulationAppliction.GetStimuAppWhere("StimulationAndTypeId='" + stimulationType.Id + "'");
                    if (u.UserType == 5)
                    {
                        if (stimulationType.State == 2)
                        {
                            if (stimuappexist == null)
                            {
                                this.btn_ServerApp.Enabled = true;
                                this.btn_ServeView.Enabled = false;
                            }
                            else
                            {
                                this.btn_ServerApp.Enabled = false;
                                this.btn_ServeView.Enabled = true;
                            }
                        }
                        else
                        {
                            this.btn_ServerApp.Enabled = false;
                            if (stimuappexist == null)
                            {

                                this.btn_ServeView.Enabled = false;
                            }
                            else
                            {

                                this.btn_ServeView.Enabled = true;
                            }
                        }
                    }
                    else
                    {
                        this.btn_ServerApp.Enabled = false;
                        this.btn_ServeView.Enabled = false;
                    }
                    break;
                case 3: StimulationApplicationForSubCenterAndCollaborateUnit stiforsub_coop = StimulationApplicationForSubCenterAndCollaborateUnit.FindUnitNewestAppforSub_Coop(stimulationType.Id, u.UnitID);
                    if (u.UserType == 6 || u.UserType == 7)
                    {
                        if (stimulationType.State == 2 || stimulationType.State == 3)
                        {
                            if (stiforsub_coop == null)
                            {
                                this.btn_ServerApp.Enabled = false;
                                this.btn_ServeView.Enabled = false;
                                this.btn_SubApp.Enabled = true;
                                this.btn_SubView.Enabled = false;
                            }
                            else
                            {
                                this.btn_ServerApp.Enabled = false;
                                this.btn_ServeView.Enabled = false;
                                this.btn_SubApp.Enabled = false;
                                this.btn_SubView.Enabled = true;
                            }
                        }
                        else
                        {
                            if (stiforsub_coop == null)
                            {

                                this.btn_SubView.Enabled = false;
                            }
                            else
                            {

                                this.btn_SubView.Enabled = true;
                            }
                        }
                    }
                    else
                    {
                        this.btn_SubApp.Enabled = false;
                        this.btn_SubView.Enabled = false;
                    }
                    break;
            }
        }
        private void forsubaddquestion(StimulationApplicationForSubCenterAndCollaborateUnit stiforsub_coop)
        {
            try
            {
                StimulationCheck stimuche = StimulationCheck.getNew();
                string SQLWhere = "StimulatedType='3' and StimulationId='" + stimuche.Id + "'";
                stimtype = StimulationType.SelecByWhere(SQLWhere);
                stiforsub_coop = StimulationApplicationForSubCenterAndCollaborateUnit.FindUnitNewestAppforSub_Coop(stimtype.Id, u.UnitID);
                List<StimulationCriterionQuestion> questlist = StimulationCriterionQuestion.GetAllStimulationCriterionQuestion() as List<StimulationCriterionQuestion>;
                questlist = questlist.Where(Item => Item.StimulationContentType == 2).ToList();
                List<StimulationCriterionAnswer> stianswerlist = new List<StimulationCriterionAnswer>();

                for (int i = 0; i < questlist.Count; i++)
                {
                    StimulationCriterionAnswer stianswer = StimulationCriterionAnswer.GetAnseerByQuest(questlist[i].Id, stiforsub_coop.Id);
                    if (stianswer == null)
                    {
                        stianswer = new StimulationCriterionAnswer();
                        stianswer.QuestionID = questlist[i].Id;
                        stianswer.ApplicationId = stiforsub_coop.Id;
                    }
                    stianswerlist.Add(stianswer);
                }

                stianswerlist[0].Content = this.tb_instrument.Text.Trim();
                stianswerlist[0].Save();

                stianswerlist[1].Content = tb_instru_scale.Text.Trim();
                stianswerlist[1].Save();

                stianswerlist[2].Content = tb_instru_worktime.Text.Trim();

                stianswerlist[2].Save();

                stianswerlist[3].Content = tb_external.Text.Trim();

                stianswerlist[3].Save();

                stianswerlist[4].Content = tb_income.Text.Trim();
                stianswerlist[4].Save();

                stianswerlist[5].Content = tb_sample.Text.Trim();
                stianswerlist[5].Save();

                stianswerlist[6].Content = tb_project.Text.Trim();
                stianswerlist[6].Save();

                if (this.affiche_badly.Checked)
                {
                    stianswerlist[7].Content = "较差";
                }
                else if (this.affiche_all_right.Checked)
                {
                    stianswerlist[7].Content = "一般";
                }
                else if (this.affiche_excellent.Checked)
                {
                    stianswerlist[7].Content = "很好";
                }
                stianswerlist[7].Save();

                stianswerlist[8].Content = tb_long_distance.Text.Trim();

                stianswerlist[8].Save();

                stianswerlist[9].Content = tbdistancemanage.Text.Trim();

                stianswerlist[9].Save();

                stianswerlist[10].Content = tbAppraise.Text.Trim();

                stianswerlist[10].Save();

                //if (long_distance_manage_verybad.Checked)
                //{
                //    stianswerlist[9].Content = "差";
                //}
                //if (this.long_distance_manage_badly.Checked)
                //{
                //    stianswerlist[9].Content = "较差";
                //}
                //else if (this.long_distance_manage_normal.Checked)
                //{
                //    stianswerlist[9].Content = "一般";
                //}
                //else if (this.long_distance_manage_excillent.Checked)
                //{
                //    stianswerlist[9].Content = "很好";
                //}
                //stianswerlist[9].Save();

                //if (appraise_none.Checked)
                //{
                //    stianswerlist[10].Content = "无";
                //}
                //if (this.appraise_badly.Checked)
                //{
                //    stianswerlist[10].Content = "差";
                //}
                //else if (this.appraise_normal.Checked)
                //{
                //    stianswerlist[10].Content = "良";
                //}
                //else if (this.appraise_excellent.Checked)
                //{
                //    stianswerlist[10].Content = "优";
                //}
                //stianswerlist[10].Save();

                if (examname == "协作单位")
                {

                    if (this.share_badly.Checked)
                    {
                        stianswerlist[11].Content = "较差";
                    }
                    else if (this.share_normal.Checked)
                    {
                        stianswerlist[11].Content = "较好";
                    }
                    else if (this.share_good.Checked)
                    {
                        stianswerlist[11].Content = "好";
                    }

                    stianswerlist[11].Save();
                }
                else
                {

                    if (subshare_badly.Checked)
                    {
                        stianswerlist[11].Content = "差";
                    }
                    if (this.subshare_normal.Checked)
                    {
                        stianswerlist[11].Content = "较差";
                    }
                    else if (this.subshare_good.Checked)
                    {
                        stianswerlist[11].Content = "较好";
                    }
                    else if (this.subshare_exellent.Checked)
                    {
                        stianswerlist[11].Content = "好";
                    }
                    stianswerlist[11].Save();
                }

                if (Rb_noneset.Checked)
                {
                    stianswerlist[12].Content = "未建设";
                }
                if (this.Rb_noneupdate.Checked)
                {
                    stianswerlist[12].Content = "未更新";
                }
                else if (this.Rb_update.Checked)
                {
                    stianswerlist[12].Content = "有更新";
                }
                else if (this.Rb_updatequarterly.Checked)
                {
                    stianswerlist[12].Content = "每季度有更新";
                }
                else if (this.Rb_updatemonthly.Checked)
                {
                    stianswerlist[12].Content = "每月有更新";
                }
                stianswerlist[12].Save();

                stianswerlist[13].Content = tb_submit.Text.Trim();
                stianswerlist[13].Save();

                stianswerlist[14].Content = tb_thesis.Text.Trim();
                stianswerlist[14].Save();

                //添加附件
                UploadFile(stiforsub_coop.Id);

            }
            catch (Exception ex)
            {

            }
        }
        private void BindPage()
        {
            StimulationCheck stimuche = StimulationCheck.getNew();
            string SQLWhere = "StimulatedType='3' and StimulationId='" + stimuche.Id + "'";
            stimtype = StimulationType.SelecByWhere(SQLWhere);
            stiforsub_coop = StimulationApplicationForSubCenterAndCollaborateUnit.FindUnitNewestAppforSub_Coop(stimtype.Id, u.UnitID);

            if (stiforsub_coop != null)
            {
                AnnexDataBind();
                List<StimulationCriterionQuestion> questlist = StimulationCriterionQuestion.GetAllStimulationCriterionQuestion() as List<StimulationCriterionQuestion>;
                questlist = questlist.Where(Item => Item.StimulationContentType == 2).ToList();
                List<StimulationCriterionAnswer> stianswerlist = new List<StimulationCriterionAnswer>();
                for (int i = 0; i < questlist.Count; i++)
                {

                    StimulationCriterionAnswer stianswer = StimulationCriterionAnswer.GetAnseerByQuest(questlist[i].Id, stiforsub_coop.Id);
                    if (stianswer == null)
                    {
                        stianswer = new StimulationCriterionAnswer();
                    }
                    stianswerlist.Add(stianswer);

                }
                this.tb_instrument.Text = stianswerlist[0].Content;
                this.tb_instru_scale.Text = stianswerlist[1].Content;
                tb_instru_worktime.Text = stianswerlist[2].Content;
                tb_external.Text = stianswerlist[3].Content;
                tb_income.Text = stianswerlist[4].Content;
                tb_sample.Text = stianswerlist[5].Content;
                tb_project.Text = stianswerlist[6].Content;

                switch (stianswerlist[7].Content)
                {
                    case "较差": affiche_badly.Checked = true; break;
                    case "一般": affiche_all_right.Checked = true; break;
                    case "很好": affiche_excellent.Checked = true; break;
                }

                tb_long_distance.Text = stianswerlist[8].Content;

                tbdistancemanage.Text = stianswerlist[9].Content;

                tbAppraise.Text = stianswerlist[10].Content;

                //switch (stianswerlist[9].Content)
                //{
                //    case "差": long_distance_manage_verybad.Checked = true; break;
                //    case "较差": long_distance_manage_badly.Checked = true; break;
                //    case "一般": long_distance_manage_normal.Checked = true; break;
                //    case "很好": this.long_distance_manage_excillent.Checked = true; break;
                //}

                //switch (stianswerlist[10].Content)
                //{
                //    case "无": appraise_none.Checked = true; break;
                //    case "差": appraise_badly.Checked = true; break;
                //    case "良": appraise_normal.Checked = true; break;
                //    case "优": this.appraise_excellent.Checked = true; break;
                //}
                if (examname == "协作单位")
                {
                    switch (stianswerlist[11].Content)
                    {
                        case "较差": share_badly.Checked = true; break;
                        case "较好": share_normal.Checked = true; break;
                        case "好": share_good.Checked = true; break;

                    }
                }
                else if (examname == "分中心")
                {
                    switch (stianswerlist[11].Content)
                    {
                        case "差": subshare_badly.Checked = true; break;
                        case "较差": subshare_normal.Checked = true; break;
                        case "较好": subshare_good.Checked = true; break;
                        case "好": this.subshare_exellent.Checked = true; break;
                    }

                    switch (stianswerlist[12].Content)
                    {
                        case "未建设": Rb_noneset.Checked = true; break;
                        case "未更新": Rb_noneupdate.Checked = true; break;
                        case "有更新": Rb_update.Checked = true; break;
                        case "每季度有更新": this.Rb_updatequarterly.Checked = true; break;
                        case "每月有更新": this.Rb_updatemonthly.Checked = true; break;
                    }

                    tb_submit.Text = stianswerlist[13].Content;
                    tb_thesis.Text = stianswerlist[14].Content;
                }
            }

            if (stimtype.State == 2)
            {
                this.SubmitApp.Visible = true;
                this.SaveApp.Visible = true;

                if (stiforsub_coop == null)
                {
                    this.DeleApp.Visible = false;
                }
                else
                {
                    this.DeleApp.Visible = true;
                }
                if (u != null)
                {
                    int countThisYear = CY.CSTS.Core.Business.view_INSTRUMENT.getUnitAuditInsCount(u.UnitID);
                    int count = CY.CSTS.Core.Business.view_INSTRUMENT.getUnitInsCount(u.UnitID);
                    tb_instrument.Text = count.ToString();
                    if (count == 0)
                    {
                        tb_instru_scale.Text = "0";
                    }
                    else
                    {
                        float persents = ((((float)countThisYear) / count) * 100);
                        if (persents.ToString().Length > (persents.ToString().LastIndexOf('.') + 3))
                        {
                            tb_instru_scale.Text = persents.ToString().Substring(0, persents.ToString().LastIndexOf('.') + 3);
                        }
                        else
                        {
                            tb_instru_scale.Text = persents.ToString();
                        }
                    }
                }
            }
            else if (stimtype.State == 3)
            {
                if (stiforsub_coop == null)
                {
                    this.SubmitApp.Visible = true;
                    this.SaveApp.Visible = true;
                    this.DeleApp.Visible = false;
                    if (u != null)
                    {
                        int countThisYear = CY.CSTS.Core.Business.view_INSTRUMENT.getUnitAuditInsCount(u.UnitID);
                        int count = CY.CSTS.Core.Business.view_INSTRUMENT.getUnitInsCount(u.UnitID);
                        tb_instrument.Text = count.ToString();
                        if (count == 0)
                        {
                            tb_instru_scale.Text = "0";
                        }
                        else
                        {
                            float persents = ((((float)countThisYear) / count) * 100);
                            if (persents.ToString().Length > (persents.ToString().LastIndexOf('.') + 3))
                            {
                                tb_instru_scale.Text = persents.ToString().Substring(0, persents.ToString().LastIndexOf('.') + 3);
                            }
                            else
                            {
                                tb_instru_scale.Text = persents.ToString();
                            }
                        }
                    }
                }
                else if (stiforsub_coop.State == 1)
                {
                    this.SubmitApp.Visible = true;
                    this.SaveApp.Visible = true;
                    this.DeleApp.Visible = true;
                }
                else if (stiforsub_coop.State == 4)
                {
                    this.SubmitApp.Visible = true;
                    this.SaveApp.Visible = false;
                    this.DeleApp.Visible = false;
                }
                else
                {
                    this.SubmitApp.Visible = false;
                    this.SaveApp.Visible = false;
                    this.DeleApp.Visible = false;
                }

            }
            else
            {
                this.SubmitApp.Visible = false;
                this.SaveApp.Visible = false;
                this.DeleApp.Visible = false;
            }
        }
        protected void SubmitApp_Click(object sender, EventArgs e)
        {
            StimulationAppliction stimuapp = new StimulationAppliction();
            try
            {

                StimulationCheck stimuche = StimulationCheck.getNew();
                string SQLWhere = "StimulatedType='3' and StimulationId='" + stimuche.Id + "'";
                stimtype = StimulationType.SelecByWhere(SQLWhere);
                stiforsub_coop = StimulationApplicationForSubCenterAndCollaborateUnit.FindUnitNewestAppforSub_Coop(stimtype.Id, u.UnitID);
                if (stiforsub_coop == null)
                {
                    stimuapp.StimulationAndTypeId = stimtype.Id;
                    stimuapp.Save();
                    stiforsub_coop = new StimulationApplicationForSubCenterAndCollaborateUnit();
                    stiforsub_coop.Id = stimuapp.Id;
                    stiforsub_coop.UintId = u.UnitID;
                    stiforsub_coop.DraftWriter = u.Name;//改
                    stiforsub_coop.FillDate = DateTime.Now;
                    stiforsub_coop.State = 2;
                    stiforsub_coop.Save();
                    forsubaddquestion(stiforsub_coop);
                }
                else
                {

                    stiforsub_coop.DraftWriter = u.Name;//改
                    stiforsub_coop.FillDate = DateTime.Now;
                    if (stiforsub_coop.State == 1)
                    {
                        stiforsub_coop.State = 2;
                    }
                    else if (stiforsub_coop.State == 4)
                    {
                        stiforsub_coop.State = 3;
                    }
                    stiforsub_coop.Save();
                    forsubaddquestion(stiforsub_coop);
                }
                Response.Redirect("StimuAppSub_CoopView.aspx");
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script type='text/javascript'>alert('考评申请提交失败!');");

            }
        }
Example #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Context.Request.QueryString["state"] != null)
            {
                state = Request.QueryString["state"];

            }
            if (Context.Request.QueryString["type"] != null)
            {
                type = Request.QueryString["type"];
            }
            if (Session["User"] != null)
            {
                U = (CY.CSTS.Core.Business.User)Session["User"];
            }
            else
            {

            }

            StimulationCheck stimuche = StimulationCheck.getNew();
            string SQLWhere = "StimulatedType='2' and StimulationId='" + stimuche.Id + "'";
            stimtype = StimulationType.SelecByWhere(SQLWhere);

            StimulationAppliction stimuappexist = StimulationAppliction.GetStimuAppWhere("StimulationAndTypeId='" + stimtype.Id + "'");
            if (stimuappexist != null)
            {
                attachmentList = CY.CSTS.Core.Business.Annex.SelectAnnexByContentID(stimuappexist.Id);
                appforcenter = StimulationApplicationForCenter.Load(stimuappexist.Id);
                if (appforcenter != null)
                {
                    if (!IsPostBack)
                    {
                        hdAppId.Value = appforcenter.Id.ToString();
                        bindCtr();
                        Bindpage();
                    }
                }
            }
        }
Example #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Buffer = true;
            Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1);
            Response.Expires = 0;
            Response.CacheControl = "no-cache";
            if (Request.QueryString["SetID"] != null && Request.QueryString["SetID"] != "")
            {
                SetID = Request.QueryString["SetID"];
                if (Request.QueryString["type"] != null && Request.QueryString["type"] == "1")
                {
                    System.Guid Setid = System.Guid.Empty;
                    if (SetID != null && CY.Utility.Common.StringUtility.IsGuid(SetID.ToString()) && (Setid = new Guid(SetID.ToString())) != System.Guid.Empty)
                    {
                        CY.CSTS.Core.Business.MACHINESET mset = CY.CSTS.Core.Business.MACHINESET.Load(Setid);
                        if (mset != null)
                        {
                            if (mset.JointreviewStateName != "未申请")
                            {
                                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "", "<script type='text/javascript'>alert('已申请!');window.location = 'StimuFP.aspx';</script>");
                                return;
                            }
                        }
                    }
                }
                StimulationCheck stimuche = StimulationCheck.getNew();
                string sqlwhere = "StimulationId='" + stimuche.Id.ToString() + "'" + "and StimulatedType='1'";
                stimtype = StimulationType.SelecByWhere(sqlwhere);

                appforcrew = StimulationApplicationForCrew.FindMachineGroupNewestAppforCrew(stimtype.Id, SetID);
                if (!IsPostBack)
                {
                    this.SubmitApp.Attributes.Add("onclick", "javascript:return checkfill()");
                    if (string.IsNullOrEmpty(Context.Request.QueryString["SetID"]) || !CY.Utility.Common.StringUtility.IsGuid(Request.QueryString["SetID"]))
                    {
                        Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "", "<script type='text/javascript'>alert('参数错误!');</script>");
                        return;
                    }

                    BindPage();

                }
            }
        }