public string SelectSentMessages() { string str = string.Empty; if (Session["associate"].ToString() != "" || Session["associate"].ToString() != null) { BllMessage objMessage = new BllMessage(); str = objMessage.SelectSentMessages(Session["associate"].ToString()); return(str); } else { return("Error in Authentication"); } }
/// <summary> /// Map User /// </summary> /// <param name="user"></param> /// <returns>new DalUser same as user</returns> public static DalMessage ToBllMessage(this BllMessage message) { if (ReferenceEquals(message, null)) { return(null); } DalMessage result = new DalMessage() { Id = message.Id, Date = message.Date, Text = message.Text, ProfileIdFrom = message.ProfileIdFrom, ProfileIdTo = message.ProfileIdTo }; return(result); }
public string SendMessages(string bodytext) { string str = string.Empty; if (Session["associate"].ToString() != "" || Session["associate"].ToString() != null) { PropMessage proMessage = new PropMessage(); proMessage.fromID = Convert.ToInt16(Session["associate"]); proMessage.toID = -1; //proMessage.subject=subject; proMessage.bodytext = bodytext; BllMessage objMessage = new BllMessage(); str = objMessage.RecordInsert(proMessage, Session["associate"].ToString()); return(str); } else { return("Error in Authentication"); } }
public void UpdateMessage(BllMessage message) { uow.Messages.Update(message.ToBllMessage()); }
public void DeleteMessage(BllMessage message) { uow.Messages.Delete(message.Id); uow.Commit(); }
public void AddMessage(BllMessage message) { uow.Messages.Create(message.ToBllMessage()); uow.Commit(); }