private void PostMessage() { try { if (Session["login"] != null && Session["AccountID"] != null) { var obj = new DTOTweet { AccountID = int.Parse(Session["AccountID"].ToString()), AccountID2 = int.Parse(lbAccountID2.Text), Message = txtMessage.Value }; BllTweet.Insert(obj); _ErrorPostMessage = LibAlert.Alert.AlertSucess("Bạn đã gửi tin nhắn thành công đến <b style='color:black'>" + lbFullNameMessage.Text + "</b>"); } else { _ErrorPostMessage = LibAlert.Alert.AlertError( "<b>Chương trình bị ngắt quãng vì lý do an toàn</b><br/>Vui lòng thoát ra và đăng nhập lại !"); } } catch (Exception ex) { _ErrorPostMessage = LibAlert.Alert.AlertError("Có lỗi xảy ra trong quá trình gửi tin nhắn <br/>" + ex.Message); } }
private void DeleteValue(int TweetID) { try { var obj = new DTOTweet { TweetID = TweetID }; BllTweet.Delete(obj); GetMessage(); lbMsgShow.Text = LibAlert.Alert.AlertSucess("Xoá thành công tin nhắn !"); LibWindowUI.Window.OpenWindows(Page, GetType(), "#myModalMsgShow"); } catch (Exception ex) { lbMsgShow.Text = LibAlert.Alert.AlertError("Có lỗi xảy ra trong quá trình xoá <br/>" + ex.Message); } }
private void PostMessage() { try { var obj = new DTOTweet { AccountID = int.Parse(Session["AccountID"].ToString()), AccountID2 = int.Parse(lbAccountIDRequest.Text), Message = txtMessageRquest.Value }; BllTweet.Insert(obj); _ErrorPostMessageRequest = LibAlert.Alert.AlertSucess("Bạn đã gửi tin nhắn thành công đến <b style='color:black'>" + lbFullNameMessageRequest.Text + "</b>"); } catch (Exception ex) { _ErrorPostMessageRequest = LibAlert.Alert.AlertError("Có lỗi xảy ra trong quá trình gửi tin nhắn <br/>" + ex.Message); } }
public static bool Delete(DTOTweet obj) { return(DalTweet.Delete(obj)); }
public static bool Insert(DTOTweet obj) { return(DalTweet.Insert(obj)); }