Example #1
0
 public static void update(WebNewsEntity webnewsEnt)
 {
     DbHelper.ExecuteNonQuery("p_WebNews_update",
         webnewsEnt.Id,
         webnewsEnt.Text,
         webnewsEnt.Url,
         webnewsEnt.IsShow
     );
 }
Example #2
0
 public static void insert(WebNewsEntity webnewsEnt)
 {
     DbHelper.ExecuteNonQuery("p_WebNews_insert",
         webnewsEnt.Text,
         webnewsEnt.Url,
         webnewsEnt.IsShow,
         webnewsEnt.AdminId
     );
 }
Example #3
0
 public static WebNewsEntity getById(int id)
 {
     DataRow dr = DbHelper.ExecuteDataRow("p_WebNews_getById", id);
     WebNewsEntity wn = new WebNewsEntity();
     if (dr != null)
     {
         wn.Id = int.Parse(dr["Id"].ToString());
         wn.Text = dr["Text"].ToString();
         wn.Url = dr["Url"].ToString();
         wn.IsShow = bool.Parse(dr["IsShow"].ToString());
         wn.AdminId = int.Parse(dr["AdminId"].ToString());
         wn.InputDt = Convert.ToDateTime(dr["inputDt"]);
     }
     return wn;
 }
 protected void btn_Save_Click(object sender, EventArgs e)
 {
     WebNewsEntity wn = new WebNewsEntity();
     wn.Url = txtUrl.Text;
     wn.IsShow = chkIsShow.Checked;
     wn.Text = txtContent.Text;
     if (id != 0)
     {
         wn.Id = id;
         logic.webNews.update(wn);
     }
     else
     {
         wn.AdminId = logic.sysAdmin.AdminID;
         logic.webNews.insert(wn);
     }
     Library.Script.ClientMsgUrl("保存成功!", "webNewsList.aspx");
 }
Example #5
0
 public static void update(WebNewsEntity wn)
 {
     WebNews.update(wn);
 }
Example #6
0
 public static void insert(WebNewsEntity wn)
 {
     WebNews.insert(wn);
 }