public int AddUserDetails() { try { Users u = new Users(); u.UserID = Convert.ToInt32(ddlUsers.SelectedItem.Value); u.GroupID = Convert.ToInt32(ddlUserGroup.SelectedItem.Value); u.LevelCode = Convert.ToInt32(ddlLevelCode.SelectedItem.Value); u.UserType = Convert.ToInt32(ddlUserType.SelectedItem.Value); u.CreatedByID = Convert.ToInt32(Session["UserID"]); u.LastUserID = Convert.ToInt32(Session["UserID"]); user_dll = new UsersDLL(); return(user_dll.AddUser(u)); } catch (Exception ex) { ErrorMessage("Adding User Error:3 " + ex.Message); return(0); } }