Exemplo n.º 1
0
    private static GroupActionStatus Validate(string scientificName, actionType act)
    {
        GroupBLL     scientificNameBLL = new GroupBLL();
        List <Group> scientificNames   = scientificNameBLL.GetGroupByFilter(scientificName.Trim());

        if (scientificNames.Count > 0 && act == actionType.insert)
        {
            return(GroupActionStatus.Duplicate);
        }
        else if (scientificNames.Count > 0 && scientificNames[0].GroupName == scientificName && act == actionType.update)
        {
            return(GroupActionStatus.Duplicate);
        }
        else
        {
            return(GroupActionStatus.Success);
        }
    }