Example #1
0
        protected void button_Click(object sender, EventArgs e)
        {
            string DefaultStr = @"ctl00$MainContent$";

            string title = Request.Form[DefaultStr + "InfoTitle"].Trim();
            string context = Request.Form[DefaultStr + "InfoDetail"].Trim();
            string teamID = Request.Form[DefaultStr + "TeamID"].Trim();
            string endtime = this.endtime.SelectedDate.ToString();

            string[] teamid = teamID.Split(';');
            InfoManage im = new InfoManage();

            bool result = im.addInfo(title, context, teamid, User.Identity.Name,"2",endtime);

            if(result)
            {
                this.ErrorMessage.Text = string.Empty;
                this.SuccessMessage.Text = @"添加通知成功,请关闭此页面";
            }
            else
            {
                this.SuccessMessage.Text = string.Empty;
                this.ErrorMessage.Text = @"添加通知失败,请检查文本格式";
            }
        }
Example #2
0
 public string deleteinfo()
 {
     string sysid = Request["infoid"];
     InfoManage im = new InfoManage();
     bool temp = im.deleteInfo(sysid);
     if (temp)
         return @"删除通知成功";
     else
         return @"删除失败,请联系管理员";
 }