예제 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         int        id = Convert.ToInt32(Request["id"]);
         NewManager cm = new NewManager();
         delete            = cm.GetByID(id);
         delete.NewsStatus = -1;
         cm.Save();
         Response.Write(1);
     }
     catch (Exception ex)
     {
         Response.Write(ex);
     }
 }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         int        id      = Convert.ToInt32(Request["id"]);
         string     name    = Request["name"];
         string     content = Request["description"];
         NewManager NM      = new NewManager();
         edit             = NM.GetByID(id);
         edit.NewsName    = name;
         edit.NewsContent = content;
         NM.Save();
         Response.Write(1);
     }
     catch (Exception ex)
     {
         Response.Write(ex);
     }
 }