示例#1
0
        private string CreateBranch(string sBranchName)
        {
            string sError = string.Empty;

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

            Branches branchManager = new Branches();
            bool     bIsExist      = branchManager.IsExist_CreateBase(sBranchName);
            if (bIsExist == true)
            {
                sError = "The name is already used by another branch. Please use another branch name.";
                return(sError);
            }

            #endregion

            try
            {
                sError = branchManager.CreateBranch(sBranchName).ToString();
            }
            catch
            {
                sError = "Fail to Create Branch.";
            }

            return(sError);
        }