public Group getGroupData(int groupId)
{
Group group = null;
string sql = "SELECT [Users_Groups_Id], [Name], [Group_description], [Group_password] FROM [USERS_GROUPS] WHERE [USERS_User_Id] = @UserId AND [Users_Groups_Id] = @gruopId";
var param = new Dictionary<string, object>();
param.Add("@UserId", uId);
param.Add("@gruopId", groupId);
var result = DBContext.ExecuteQueryTable(sql, param);
if (result != null && result.Rows.Count > 0)
{
group = (new Group
{
groupId = Convert.ToInt16(result.Rows[0][0]),
groupName = Convert.ToString(result.Rows[0][1]),
groupDescription = Convert.ToString(result.Rows[0][2]),
groupPassword = Convert.ToString(result.Rows[0][3])
});
}
return group;
}