protected void addnv_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(CurentId)) { if (string.IsNullOrEmpty(text_nd.InnerText.Trim())) { lbbinhluan.Visible = true; lbbinhluan.Text = "Vui Lòng Nhập Bình Luận"; } //insert else { TblBinhLuan nv = new TblBinhLuan(); string nhanvien = ddlNhanVien.SelectedItem.Text; string idNhanVien = ddlNhanVien.SelectedItem.Value; string idNhanVien2 = ddlNhanVien.SelectedValue; nv.IdNguoiBinhLuan = Guid.Parse(idNhanVien); nv.Id = Guid.NewGuid(); nv.NoiDung = text_nd.InnerText; nv.IdThongBao = Guid.Parse(CurentId); nv.NgayTao = DateTime.Now; nv = BinhLuanBussiness.InssertBinhLuan(nv); Response.Redirect(string.Format("/BinhLuanAdd.aspx?Id={0}", CurentId)); } } else { } }
public static TblBinhLuan UpdateBinhLuan(TblBinhLuan item) { return(new TblBinhLuanController().Update(item)); }
public static TblBinhLuan InssertBinhLuan(TblBinhLuan item) { return(new TblBinhLuanController().Insert(item)); }