コード例 #1
0
    protected void BtnSave_Click(object sender, EventArgs e)
    {
        KnowledgeTypeModel knowledgeTypeModel = new KnowledgeTypeModel();

        knowledgeTypeModel = this.GetValueFromText();
        if (!ClassAdd.Exists(knowledgeTypeModel.TypeName, knowledgeTypeModel.ParentId))
        {
            base.RegisterScript("top.ui.alert('类型名称已存在');");
            return;
        }
        if (base.Request.QueryString["optype"] == "ADD")
        {
            if (KnowledgeTypeAction.AddNewType(knowledgeTypeModel) != 1)
            {
                base.RegisterScript("top.ui.alert('保存失败');");
                return;
            }
            base.RegisterScript("top.ui.tabSuccess({ parentName: '_knowlegedatatype' });");
            return;
        }
        else
        {
            if (KnowledgeTypeAction.UpdateType(knowledgeTypeModel) != 1)
            {
                base.RegisterScript("top.ui.alert('修改失败');");
                return;
            }
            base.RegisterScript("top.ui.tabSuccess({ parentName: '_knowlegedatatype' });");
            return;
        }
    }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack && base.Request.QueryString["optype"] != "ADD")
     {
         KnowledgeTypeModel singleType = KnowledgeTypeAction.GetSingleType(base.Request.QueryString["ID"]);
         this.GetValueFromTable(singleType);
     }
 }
コード例 #3
0
ファイル: typelist.aspx.cs プロジェクト: zxl881203/src
 protected void BtnDel_Click(object sender, EventArgs e)
 {
     if (KnowledgeTypeAction.DelType(this.hdnType.Value) > 0)
     {
         this.GridBind(this.ViewState["TYPEID"].ToString(), this.ViewState["VALId"].ToString());
         this.js.Text = "window.parent.lframe.location.href +='';";
     }
 }
コード例 #4
0
ファイル: datumclasstree.aspx.cs プロジェクト: zxl881203/src
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.Page.IsPostBack)
        {
            string text = base.Request.QueryString["type"];
            string key;
            switch (key = text)
            {
            case "1":
                this.strRur = "/EPC/QuaitySafety/CriterionList.aspx?Flage=Q&Type=Edit";
                break;

            case "2":
                this.strRur = "/EPC/QuaitySafety/CriterionList.aspx?Flage=Q&Type=List";
                break;

            case "3":
                this.strRur = "/EPC/QuaitySafety/CriterionList.aspx?Flage=S&Type=Edit";
                break;

            case "4":
                this.strRur = "/EPC/QuaitySafety/CriterionList.aspx?Flage=S&Type=List";
                break;

            case "5":
                this.strRur = "/EPC/QuaitySafety/AccidentRecord.aspx?Flage=Q&Type=Edit";
                break;

            case "6":
                this.strRur = "/EPC/QuaitySafety/AccidentRecord.aspx?Flage=Q&Type=List";
                break;

            case "7":
                this.strRur = "/EPC/QuaitySafety/AccidentRecord.aspx?Flage=S&Type=Edit";
                break;

            case "8":
                this.strRur = "/EPC/QuaitySafety/AccidentRecord.aspx?Flage=S&Type=List";
                break;

            case "11":
                this.strRur = "DatumClassList.aspx?Parent=3";
                break;

            case "12":
                this.strRur = "DatumClassList.aspx?Parent=2";
                break;
            }
            DataTable type = KnowledgeTypeAction.GetType("");
            string    pid  = base.Request.QueryString["Parent"];
            this.TreeBind(this.strRur, type, pid);
        }
    }
コード例 #5
0
    private void DDLBind(string TypeId)
    {
        DataTable type = KnowledgeTypeAction.GetType("");

        this.DDL_Class.DataSource     = type;
        this.DDL_Class.DataTextField  = "TypeName";
        this.DDL_Class.DataValueField = "TypeId";
        this.DDL_Class.DataBind();
        if (TypeId.Trim() != "")
        {
            this.DDL_Class.SelectedValue = TypeId;
        }
    }
コード例 #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.Response.Cache.SetNoStore();
        if (base.Request.QueryString["PrjCode"] == Guid.Empty.ToString())
        {
            base.Response.Write("<font style='font-size:9pt'>请先选择分配项目</font>");
            base.Response.End();
        }
        this.ViewState["TYPE"]    = base.Request.QueryString["type"];
        this.ViewState["PrjGuid"] = ((base.Request.QueryString["PrjCode"] == null) ? "" : base.Request.QueryString["PrjCode"].ToString());
        string url = "";

        if (!this.Page.IsPostBack)
        {
            this.ViewState["DT"] = KnowledgeTypeAction.GetType("");
            string a;
            if ((a = this.ViewState["TYPE"].ToString()) != null)
            {
                if (!(a == "1"))
                {
                    if (!(a == "2"))
                    {
                        if (!(a == "3"))
                        {
                            if (a == "4")
                            {
                                url = "DatumSeach.aspx?PrjCode=" + this.ViewState["PrjGuid"].ToString();
                            }
                        }
                        else
                        {
                            url = "DatumAffirmList.aspx?PrjCode=" + this.ViewState["PrjGuid"].ToString();
                        }
                    }
                    else
                    {
                        url = "DatumList.aspx?PrjCode=" + this.ViewState["PrjGuid"].ToString();
                    }
                }
                else
                {
                    url = "TypeList.aspx";
                }
            }
            DataTable type = KnowledgeTypeAction.GetType("");
            this.TreeBind(url, type);
        }
    }
コード例 #7
0
ファイル: criterionedit.aspx.cs プロジェクト: zxl881203/src
    private void SetValueFromTable()
    {
        CriterionModel criterionModel = new CriterionModel();

        criterionModel = CriterionAction.GetSingle(new Guid(this.Session["CriterionCODE"].ToString()));
        DataTable type = DatumClass.GetType(criterionModel.Flage.ToString());

        if (type != null && type.Rows.Count > 0)
        {
            foreach (DataRow dataRow in type.Rows)
            {
                object obj = dataRow["TypeName"];
                if (obj != null)
                {
                    this.txtClass.Text = dataRow["TypeName"].ToString();
                }
            }
        }
        this.PublisherYhmc.Text    = com.jwsoft.pm.entpm.PageHelper.QueryUser(this, criterionModel.PublishYhdm.Trim());
        this.TxtCriterionName.Text = criterionModel.CriterionName;
        if (CriterionEdit.IsNumber(criterionModel.Publisher))
        {
            this.TxtPublisher.Text = com.jwsoft.pm.entpm.PageHelper.QueryDept(this, Convert.ToInt32(criterionModel.Publisher));
        }
        this.Textbox1.Text  = criterionModel.Remark;
        this.hdnClass.Value = KnowledgeTypeAction.GetSingleType(criterionModel.Flage).TypeName;
        this.hdnDept.Value  = criterionModel.Publisher.ToString();
        CriterionLogic criterionLogic = new CriterionLogic();
        DataTable      dtModelByID    = criterionLogic.getDtModelByID(criterionModel.CriterionCode.ToString());

        foreach (DataRow dataRow2 in dtModelByID.Rows)
        {
            if (dataRow2["mark"].ToString() == "3")
            {
                this.HiddenField1.Value = "3";
            }
            string value = dataRow2["mark"].ToString();
            this.hdnmark.Value = value;
        }
    }