예제 #1
0
        private string CreateDivision(string sDivisionName)
        {
            string sError = string.Empty;

            sDivisionName = sDivisionName.Trim();
            #region 检查是否存在

            Divisions divManager = new Divisions();
            bool      bIsExist   = divManager.IsExist_CreateBase(sDivisionName);
            if (bIsExist == true)
            {
                sError = "The name is already used by another group. Please use another group name.";
                return(sError);
            }

            #endregion

            try
            {
                sError = divManager.CreateDivision(sDivisionName).ToString();
            }
            catch
            {
                sError = "Fail to Create Division.";
            }

            return(sError);
        }