コード例 #1
0
        /// <summary>
        /// 添加组织机构
        /// </summary>
        /// <param name="org"></param>
        /// <returns>执行结果</returns>
        public Result Add(sys_org org)
        {
            Result          res    = new Result();
            OrganizationDAL orgDAL = new OrganizationDAL();

            try
            {
                if (orgDAL.Add(org) == 0)
                {
                    res.Code    = RES.ERROR;
                    res.Message = "添加失败!";
                    return(res);
                }
                else
                {
                    res.Code    = RES.OK;
                    res.Message = "添加成功!";
                    return(res);
                }
            }
            catch
            {
                res.Code    = RES.ERROR;
                res.Message = "添加失败!";
                return(res);
            }
        }
コード例 #2
0
 public long InsertInfo(OrganizationInfo info)
 {
     info.ValidFlag = true;
     return(dal.Add(info));
 }