public static bool DeleteChat(string senderId, string groupId, string reciverId, string chatId, string userId) { if (senderId == userId) { bool flagCheckDelete = CheckDeleteMsg(senderId, chatId, groupId, reciverId); if (flagCheckDelete == true) { return(DeleteMsgBuisnes.DeleteMsg(chatId)); } } return(false); }
public static bool CheckDeleteMsg(string senderId, string chatId, string GroupId, string ReciverId) { bool flagCheckDelete = false; if (GroupId.Trim() != "") { flagCheckDelete = DeleteMsgBuisnes.CheckDeleteMsgGroup(GroupId, chatId, senderId); } else if (ReciverId != "") { flagCheckDelete = DeleteMsgBuisnes.CheckDeleteMsgPersonal(ReciverId, chatId, senderId); } return(flagCheckDelete); }