Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e) {
     this.Title = "发布公告";
     if (!IsPostBack) {
         QJVRMS.Business.NoticeFactory noticeFactory = new QJVRMS.Business.NoticeFactory();
         logName = CurrentUser.UserLoginName;
         this.Content.InnerHtml = noticeFactory.GetNoticesContent(logName, 10, 1);
         
     }
 }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.Title = "发布公告";
     if (!IsPostBack)
     {
         QJVRMS.Business.NoticeFactory noticeFactory = new QJVRMS.Business.NoticeFactory();
         logName = CurrentUser.UserLoginName;
         this.Content.InnerHtml = noticeFactory.GetNoticesContent(logName, 10, 1);
     }
 }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e) {
            string result = string.Empty;

            string type = get_LinkParam("type");
            string name = string.Empty;
            string noticeId = string.Empty;

            QJVRMS.Business.NoticeFactory noticeFactory = new QJVRMS.Business.NoticeFactory();

            switch (type) { 
                case "Single":
                    name = get_LinkParam("name");
                    noticeId = get_LinkParam("noticeid");
                    result = noticeFactory.GetNoticeContent(noticeId, name);
                    break;
                case "Page":
                    name = get_LinkParam("name");
                    int pageSize = int.Parse(get_LinkParam("size"));
                    int pageIndex = int.Parse(get_LinkParam("index"));
                    result = noticeFactory.GetNoticesContent(name, pageSize, pageIndex);
                    break;
                case "Update":
                    name = get_LinkParam("name");
                    noticeId = get_LinkParam("noticeId");
                    string noticeName = get_LinkParam("noticeName");
                    string noticeContent = get_LinkParam("noticeContent");
                    if (noticeFactory.EditNotice(noticeId, noticeName, noticeContent, name, type))
                        result = "更新成功";
                    else
                        result = "更新失败";
                    break;
                case "Add":
                    name = get_LinkParam("name");
                    noticeId = Guid.NewGuid().ToString();
                    string nName = get_LinkParam("noticeName");
                    string nContent = get_LinkParam("noticeContent");
                    if (noticeFactory.EditNotice(noticeId, nName, nContent, name, type))
                        result = "更新成功";
                    else
                        result = "更新失败";
                    break;
                case "Delete":
                    string nid = get_LinkParam("id");
                    if (noticeFactory.DeleteNotice(nid))
                        result = nid;
                    break;
            }

            Response.Write(result);
            Response.End();
        }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string result = string.Empty;

            string type     = get_LinkParam("type");
            string name     = string.Empty;
            string noticeId = string.Empty;

            QJVRMS.Business.NoticeFactory noticeFactory = new QJVRMS.Business.NoticeFactory();

            switch (type)
            {
            case "Single":
                name     = get_LinkParam("name");
                noticeId = get_LinkParam("noticeid");
                result   = noticeFactory.GetNoticeContent(noticeId, name);
                break;

            case "Page":
                name = get_LinkParam("name");
                int pageSize  = int.Parse(get_LinkParam("size"));
                int pageIndex = int.Parse(get_LinkParam("index"));
                result = noticeFactory.GetNoticesContent(name, pageSize, pageIndex);
                break;

            case "Update":
                name     = get_LinkParam("name");
                noticeId = get_LinkParam("noticeId");
                string noticeName    = get_LinkParam("noticeName");
                string noticeContent = get_LinkParam("noticeContent");
                if (noticeFactory.EditNotice(noticeId, noticeName, noticeContent, name, type))
                {
                    result = "更新成功";
                }
                else
                {
                    result = "更新失败";
                }
                break;

            case "Add":
                name     = get_LinkParam("name");
                noticeId = Guid.NewGuid().ToString();
                string nName    = get_LinkParam("noticeName");
                string nContent = get_LinkParam("noticeContent");
                if (noticeFactory.EditNotice(noticeId, nName, nContent, name, type))
                {
                    result = "更新成功";
                }
                else
                {
                    result = "更新失败";
                }
                break;

            case "Delete":
                string nid = get_LinkParam("id");
                if (noticeFactory.DeleteNotice(nid))
                {
                    result = nid;
                }
                break;
            }

            Response.Write(result);
            Response.End();
        }