Example #1
0
        public bool veriFileType(int tid, int _typeid)
        {
            ArrayList list = new ArrayList();

            list.Add(string.Concat(new object[] { "SELECT * FROM EPM_Datum_Affair eda  LEFT JOIN XPM_Basic_CodeList xbcl ON xbcl.CodeID=eda.filesType LEFT JOIN XPM_Basic_CodeType xbct  ON xbct.TypeID = xbcl.TypeID WHERE xbct.SignCode='DocumentType' AND eda.filesType=", tid, " AND xbcl.TypeID=", _typeid }));
            list.Add(string.Concat(new object[] { "SELECT * FROM v_Quality_Goal eda  LEFT JOIN XPM_Basic_CodeList xbcl ON xbcl.CodeID=eda.filesType LEFT JOIN XPM_Basic_CodeType xbct  ON xbct.TypeID = xbcl.TypeID WHERE xbct.SignCode='DocumentType' AND eda.filesType=", tid, " AND xbcl.TypeID=", _typeid }));
            string saftyViewName = SafetyMeasureAction.GetSaftyViewName();

            list.Add(string.Concat(new object[] { "SELECT * FROM ", saftyViewName, " eda  LEFT JOIN XPM_Basic_CodeList xbcl ON xbcl.CodeID=eda.filesType LEFT JOIN XPM_Basic_CodeType xbct  ON xbct.TypeID = xbcl.TypeID WHERE xbct.SignCode='DocumentType' AND eda.filesType=", tid, " AND xbcl.TypeID=", _typeid }));
            list.Add(string.Concat(new object[] { "SELECT * FROM Prj_V_ScienceInnovate eda  LEFT JOIN XPM_Basic_CodeList xbcl ON xbcl.CodeID=eda.filesType LEFT JOIN XPM_Basic_CodeType xbct  ON xbct.TypeID = xbcl.TypeID WHERE xbct.SignCode='DocumentType' AND eda.filesType=", tid, " AND xbcl.TypeID=", _typeid }));
            list.Add(string.Concat(new object[] { "SELECT * FROM Prj_V_ExpertProject eda  LEFT JOIN XPM_Basic_CodeList xbcl ON xbcl.CodeID=eda.filesType LEFT JOIN XPM_Basic_CodeType xbct  ON xbct.TypeID = xbcl.TypeID WHERE xbct.SignCode='DocumentType' AND eda.filesType=", tid, " AND xbcl.TypeID=", _typeid }));
            list.Add(string.Concat(new object[] { "SELECT * FROM Prj_TechnologyCriterion eda  LEFT JOIN XPM_Basic_CodeList xbcl ON xbcl.CodeID=eda.filesType LEFT JOIN XPM_Basic_CodeType xbct  ON xbct.TypeID = xbcl.TypeID WHERE xbct.SignCode='DocumentType' AND eda.filesType=", tid, " AND xbcl.TypeID=", _typeid }));
            list.Add(string.Concat(new object[] { "SELECT * FROM Prj_TechnologyManage eda  LEFT JOIN XPM_Basic_CodeList xbcl ON xbcl.CodeID=eda.filesType LEFT JOIN XPM_Basic_CodeType xbct  ON xbct.TypeID = xbcl.TypeID WHERE xbct.SignCode='DocumentType' AND eda.filesType=", tid, " AND xbcl.TypeID=", _typeid }));
            list.Add(string.Concat(new object[] { "SELECT * FROM Prj_V_TechnologyJD eda  LEFT JOIN XPM_Basic_CodeList xbcl ON xbcl.CodeID=eda.filesType LEFT JOIN XPM_Basic_CodeType xbct  ON xbct.TypeID = xbcl.TypeID WHERE xbct.SignCode='DocumentType' AND eda.filesType=", tid, " AND xbcl.TypeID=", _typeid }));
            list.Add(string.Concat(new object[] { "SELECT * FROM Prj_Summary eda  LEFT JOIN XPM_Basic_CodeList xbcl ON xbcl.CodeID=eda.filesType LEFT JOIN XPM_Basic_CodeType xbct  ON xbct.TypeID = xbcl.TypeID WHERE xbct.SignCode='DocumentType' AND eda.filesType=", tid, " AND xbcl.TypeID=", _typeid }));
            list.Add(string.Concat(new object[] { "SELECT * FROM Prj_ItemInspect eda  LEFT JOIN XPM_Basic_CodeList xbcl ON xbcl.CodeID=eda.filesType LEFT JOIN XPM_Basic_CodeType xbct  ON xbct.TypeID = xbcl.TypeID WHERE xbct.SignCode='DocumentType' AND eda.filesType=", tid, " AND xbcl.TypeID=", _typeid }));
            list.Add(string.Concat(new object[] { "SELECT * FROM Prj_ItemProg eda  LEFT JOIN XPM_Basic_CodeList xbcl ON xbcl.CodeID=eda.filesType LEFT JOIN XPM_Basic_CodeType xbct  ON xbct.TypeID = xbcl.TypeID WHERE xbct.SignCode='DocumentType' AND eda.filesType=", tid, " AND xbcl.TypeID=", _typeid }));
            for (int i = 0; i < list.Count; i++)
            {
                DataTable table = SqlHelper.ExecuteQuery(CommandType.Text, list[i].ToString().ToString(), null);
                if ((table != null) && (table.Rows.Count > 0))
                {
                    return(false);
                }
            }
            return(true);
        }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         string a;
         if ((a = this.page_type) != null)
         {
             if (!(a == "Add"))
             {
                 if (a == "Update")
                 {
                     this.LblHead.Text = "修改安全目标方案";
                     SafetyMeasureAction.GetSingleRow(this.Page_Code);
                     this.InfoObj = this.ActObj.GetSafetyMeasureModel(this.Page_Code);
                     if (this.InfoObj != null)
                     {
                         this.TxtScheduleCode.Text      = this.InfoObj.TaskName;
                         this.TxtMeasure.Text           = this.InfoObj.SaftyMeasure;
                         this.Txtremark.Text            = this.InfoObj.Remark;
                         this.hdnTempScheduleCode.Value = this.InfoObj.ScheduleCode;
                         this.hdnprjcode.Value          = this.InfoObj.PrjCode.ToString();
                         int arg_13D_0 = this.InfoObj.Mark;
                         if (this.InfoObj.Mark.ToString() != "")
                         {
                             int mark = this.InfoObj.Mark;
                             if (mark != 2)
                             {
                                 this.cbkmark.Checked = true;
                                 int arg_184_0 = this.InfoObj.FilesType;
                                 if (this.InfoObj.FilesType.ToString() != "")
                                 {
                                     this.hidenClass.Value = this.InfoObj.FilesType.ToString();
                                 }
                             }
                             this.hdnmark.Value = mark.ToString();
                         }
                     }
                 }
             }
             else
             {
                 if (base.Request["PrjCode"] == "")
                 {
                     this.JS.Text = "alert('请选择项目!');window.close();";
                 }
                 this.LblHead.Text = "新增安全目标方案";
             }
         }
         this.TxtScheduleCode.Attributes["onclick"] = "javascript:pickSchedule(this);";
     }
 }
Example #3
0
 protected void BtnDelete_Click(object sender, EventArgs e)
 {
     new SafetyMeasureAction();
     if (SafetyMeasureAction.DEL(new SafetyMeasureInfo
     {
         i_id = Convert.ToInt32(this.hiden_i_id.Value)
     }.i_id.ToString()) == 1)
     {
         this.JS.Text = "alert('操作成功!');";
         this.Data_Bind();
         return;
     }
     this.JS.Text = "alert('操作失败,网络连接故障,请稍候再试')";
 }
Example #4
0
    protected void BtnOK_Click(object sender, EventArgs e)
    {
        if (this.page_Code != "")
        {
            this.hdnPn.Value  = this.page_Code;
            this.InfoObj.i_id = int.Parse(this.page_Code);
        }
        this.InfoObj.PrjCode      = new Guid(this.hdnprjcode.Value);
        this.InfoObj.ScheduleName = this.TxtScheduleCode.Text;
        this.InfoObj.ScheduleCode = this.hdnTempScheduleCode.Value;
        this.InfoObj.SaftyMeasure = this.TxtMeasure.Text;
        this.InfoObj.Remark       = this.Txtremark.Text;
        new DatumLogic();
        int num = 0;

        if (this.cbkmark.Checked)
        {
            this.InfoObj.Mark       = 3;
            this.InfoObj.FilesType  = int.Parse(this.DDTClass.SelectedValue.ToString());
            this.filesClass.Visible = true;
        }
        else
        {
            this.InfoObj.Mark       = 2;
            this.InfoObj.FilesType  = 0;
            this.filesClass.Visible = false;
        }
        string a;

        if ((a = this.Page_type) != null)
        {
            if (!(a == "Add"))
            {
                if (a == "Update")
                {
                    num = SafetyMeasureAction.Update(this.InfoObj);
                }
            }
            else
            {
                num = SafetyMeasureAction.Add(this.InfoObj);
            }
        }
        if (num > 0)
        {
            base.RegisterScript("top.ui.tabSuccess({ parentName: '_measurelist' });");
            return;
        }
        base.RegisterScript("top.ui.alert('修改失败');");
    }
Example #5
0
    protected void Data_Bind()
    {
        string strWhere;

        if (this.page_PrjCode != "")
        {
            strWhere = "PrjCode= '" + this.page_PrjCode + "'";
        }
        else
        {
            strWhere = "PrjCode= '" + Guid.NewGuid() + "'";
        }
        DataTable pageData = SafetyMeasureAction.GetPageData(strWhere);

        this.GridView_goall.DataSource            = pageData;
        this.ViewState[MeasureList.resourceTable] = pageData;
        this.GridView_goall.DataBind();
    }