public bool saveGroup()
{
// int groupId;
string sql = "INSERT INTO [USERS_GROUPS] (USERS_User_Id, Name, Group_description, Group_password) VALUES (@userId, @groupName, @groupDescription, @groupPassword)";
var param = new Dictionary<string, object>();
param.Add("@userId", UserSessionData.userId);
param.Add("@groupName", groupName);
param.Add("@groupDescription", groupPassword);
param.Add("@groupPassword", groupDescription);
var result = DBContext.ExecuteQueryTable(sql, param);
if (result != null)
{
sql = "SELECT IDENT_CURRENT('USERS_GROUPS')";
result = DBContext.ExecuteQueryTable(sql);
if (result.Rows.Count > 0)
{
groupId = Convert.ToInt16(result.Rows[0][0]);
return true;
}
else
return false;
}
else
return false;
}