示例#1
0
    protected void BtnSave_Click(object sender, EventArgs e)
    {
        EntStandardInfo entStandInfo = this.GetEntStandInfo();

        if (this._Type == "Add")
        {
            int num = EntStandardAction.StandardAdd(entStandInfo);
            if (num == 1)
            {
                string text = "parent.desktop.flowclass.location=parent.desktop.flowclass.location;";
                text                += "alert('保存成功');";
                text                += "top.frameWorkArea.window.desktop.getActive().close();";
                this.Js.Text         = text;
                this.BtnSave.Enabled = false;
                return;
            }
            this.Js.Text = "alert('保存失败!'); ";
            return;
        }
        else
        {
            int num = EntStandardAction.StandUpd(entStandInfo, this._Id);
            if (num >= 1)
            {
                string text2 = "parent.desktop.flowclass.location=parent.desktop.flowclass.location;";
                text2               += "alert('保存成功');";
                text2               += "top.frameWorkArea.window.desktop.getActive().close();";
                this.Js.Text         = text2;
                this.BtnSave.Enabled = false;
                return;
            }
            this.Js.Text = "alert('保存失败!'); ";
            return;
        }
    }
示例#2
0
    private void StandardBind()
    {
        string classId = this._ClassId;

        this.DGrdStandard.DataSource = EntStandardAction.GetStandardList(classId);
        this.DGrdStandard.DataBind();
    }
示例#3
0
    private void GetEntStandardInfoOfUpd(string Id)
    {
        DataTable standardSingle = EntStandardAction.GetStandardSingle(Id);

        this.TxtStandCode.Text = standardSingle.Rows[0]["TechnologyCriterionID"].ToString();
        this.TxtStandName.Text = standardSingle.Rows[0]["TechnologyName"].ToString();
        ((EditDropDownList)this.lbPlanSort.FindControl("ddlPlanSort")).Text = standardSingle.Rows[0]["TechnologyClassify"].ToString().Trim();
        this.DatePublicTime.Text = standardSingle.Rows[0]["TechnologyPromulgateTime"].ToString();
        this.TxtRemark.Text      = standardSingle.Rows[0]["Remark"].ToString();
        this.hdnEnterGuid.Value  = standardSingle.Rows[0]["EnterGuid"].ToString();
        this.FileLink1.FID       = this.hdnEnterGuid.Value.Trim();
    }
示例#4
0
    protected void BtnDel_Click(object sender, EventArgs e)
    {
        int num = EntStandardAction.StandDel(this.HdnId.Value);

        if (num == 1)
        {
            this.Js.Text = "alert('删除成功!');";
            this.StandardBind();
            return;
        }
        this.Js.Text = "alert('删除失败!'); ";
    }
示例#5
0
 private bool ExistInformation(string[] arrTcode)
 {
     for (int i = 0; i < arrTcode.Length; i++)
     {
         string    strId = arrTcode[i];
         DataTable fileClassInformation = this.pfua.GetFileClassInformation(strId);
         DataTable standardList         = EntStandardAction.GetStandardList(fileClassInformation.Rows[0]["ClassID"].ToString());
         if (standardList.Rows.Count > 0)
         {
             base.RegisterScript("alert('系统提示:\\n此类已被使用,不能删除!');");
             return(false);
         }
     }
     return(true);
 }
示例#6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.BindDropDownList();
     if (!base.IsPostBack)
     {
         this.ViewState["Type"] = base.Request.QueryString["Type"].ToString();
         this._Type             = this.ViewState["Type"].ToString();
         this.HdnType.Value     = this._Type;
         this.FileLink1.MID     = 1721;
         this.FileLink1.Type    = 1;
         if (this._Type == "Upd")
         {
             this.ViewState["Id"] = base.Request.QueryString["Id"].ToString();
             this._Id             = this.ViewState["Id"].ToString();
             this.GetEntStandardInfoOfUpd(this._Id);
             this.lb_change.Text = "编辑";
             return;
         }
         if (this._Type == "Add")
         {
             this.ViewState["ClassId"] = base.Request.QueryString["ClassId"].ToString();
             this.ViewState["ID"]      = EntStandardAction.GetMaxId();
             this.ViewState["ID"].ToString();
             this._ClassId           = this.ViewState["ClassId"].ToString();
             this._MaxId             = this.ViewState["ID"].ToString();
             this.lb_change.Text     = "新增";
             this.hdnEnterGuid.Value = Guid.NewGuid().ToString();
             this.FileLink1.FID      = this.hdnEnterGuid.Value.Trim();
             return;
         }
         if (this._Type == "View")
         {
             this.FileLink1.Type    = 0;
             this.FileLink1.Visible = false;
             this.ControlSet();
             this.BtnSave.Enabled = false;
             this.ViewState["Id"] = base.Request.QueryString["Id"].ToString();
             this._Id             = this.ViewState["Id"].ToString();
             this.GetEntStandardInfoOfUpd(this._Id);
             this.lb_change.Text = "查看";
             this.BunClose.Value = "关 闭";
             this.Literal1.Text  = FileView.FilesBind(1721, this.hdnEnterGuid.Value.Trim());
             return;
         }
     }
     else
     {
         this._Type = this.ViewState["Type"].ToString();
         if (this._Type == "Upd")
         {
             this._Id = this.ViewState["Id"].ToString();
             return;
         }
         if (this._Type == "Add")
         {
             this._ClassId = this.ViewState["ClassId"].ToString();
             this._MaxId   = this.ViewState["ID"].ToString();
             return;
         }
         if (this._Type == "View")
         {
             this._Id = this.ViewState["Id"].ToString();
         }
     }
 }