Exemple #1
0
 public void LoadData()
 {
     RmsPM.BLL.LinkManage  clinkManage  = new RmsPM.BLL.LinkManage();
     System.Data.DataTable dtlinkManage = clinkManage.GetLinkManages();
     this.rpNotice.DataSource = dtlinkManage;
     this.rpNotice.DataBind();
 }
Exemple #2
0
    protected void btnDelete_ServerClick(object sender, EventArgs e)
    {
        try
        {
            RmsPM.BLL.LinkManage clinkManage = new RmsPM.BLL.LinkManage();
            clinkManage.LinkManageCode = LinkManageCode;
            clinkManage.LinkManageDelete();


            Response.Write(Rms.Web.JavaScript.ScriptStart);
            Response.Write("window.opener.location = window.opener.location;");
            Response.Write(Rms.Web.JavaScript.WinClose(false));
            //			string FromUrl = this.txtFromUrl.Value.Trim();
            //			if (FromUrl != "")
            //			{
            //				Response.Write(string.Format("window.location = '{0}';", FromUrl));
            //			}
            Response.Write(Rms.Web.JavaScript.ScriptEnd);
        }
        catch (Exception ex)
        {
            Response.Write(JavaScript.Alert(true, "删除失败:" + ex.Message));

            return;
        }
    }
Exemple #3
0
 public void LoadData()
 {
     if (!this.user.HasRight("110704") && !this.user.HasRight("110701"))
     {
         Response.Redirect("../RejectAccess.aspx");
         Response.End();
     }
     this.btnAdd.Visible = this.user.HasRight("110701");
     RmsPM.BLL.LinkManage  clinkManage  = new RmsPM.BLL.LinkManage();
     System.Data.DataTable dtlinkManage = clinkManage.GetLinkManages();
     this.dgList.DataSource = dtlinkManage;
     this.dgList.DataBind();
 }
Exemple #4
0
    protected void btnSave_ServerClick(object sender, EventArgs e)
    {
        try
        {
            if (this.txtSoftwareName.Value.Trim() == "")
            {
                Response.Write(JavaScript.Alert(true, "软件名称不允许为空"));
                return;
            }
            if (this.TxtLinkUrl.Value.Trim() == "")
            {
                Response.Write(JavaScript.Alert(true, "链接地址不允许为空"));
                return;
            }

            RmsPM.BLL.LinkManage clinkManage = new RmsPM.BLL.LinkManage();

            clinkManage.LinkManageCode = LinkManageCode;

            clinkManage.Linkname   = this.txtSoftwareName.Value;
            clinkManage.LinkUrl    = this.TxtLinkUrl.Value;
            clinkManage.CreateDate = System.DateTime.Now.ToString("yyyy-MM-dd");
            clinkManage.LinkManageAdd();


            Response.Write(Rms.Web.JavaScript.ScriptStart);
            Response.Write("window.opener.location = window.opener.location;");
            Response.Write(Rms.Web.JavaScript.WinClose(false));
            //			string FromUrl = this.txtFromUrl.Value.Trim();
            //			if (FromUrl != "")
            //			{
            //				Response.Write(string.Format("window.location = '{0}';", FromUrl));
            //			}
            Response.Write(Rms.Web.JavaScript.ScriptEnd);
        }
        catch (Exception ex)
        {
            Response.Write(JavaScript.Alert(true, "保存失败:" + ex.Message));

            return;
        }
    }
Exemple #5
0
    private void LoadData()
    {
        LinkManageCode = Request["LinkManageCode"] + "";
        if (!this.user.HasRight("110701") && !this.user.HasRight("110702") && !this.user.HasRight("110703"))
        {
            Response.Redirect("../RejectAccess.aspx");
            Response.End();
        }

        if (!this.user.HasRight("110701") && !this.user.HasRight("110702"))
        {
            this.btnSave.Visible = false;
        }
        if (!this.user.HasRight("110703"))
        {
            this.btnDelete.Visible = false;
        }



        if (LinkManageCode != "")
        {
            RmsPM.BLL.LinkManage clinkManage = new RmsPM.BLL.LinkManage();
            clinkManage.LinkManageCode = LinkManageCode;
            System.Data.DataTable dtlinkManage = clinkManage.GetLinkManages();
            for (int i = 0; i < dtlinkManage.Rows.Count; i++)
            {
                this.txtSoftwareName.Value  = dtlinkManage.Rows[i]["Linkname"].ToString();
                this.TxtLinkUrl.Value       = dtlinkManage.Rows[i]["LinkUrl"].ToString();
                this.tdCreateDate.InnerHtml = System.Convert.ToDateTime(dtlinkManage.Rows[i]["CreateDate"]).ToString("yyyy-MM-dd");
            }
        }
        else
        {
            this.btnDelete.Visible = false;
        }
    }