示例#1
0
 /// <summary>
 /// Author:Gavin
 /// Create Date:2017-03-14
 /// Description:添加使用单位企业信息
 /// </summary>
 /// <param name="userCompany">使用单位实体</param>
 /// <returns></returns>
 public ActionResult CompanyInfo(UseCompany userCompany)
 {
     try
     {
         cService.AddCompanyInfo(userCompany, ApiUser.Current);
         return(Json(new { status = 0 }));
     }
     catch (DataExistException e)
     {
         return(Json(new { error = e.Message }));
     }
 }
示例#2
0
        public ActionResult Register(UseCompany useCompany)
        {
            try
            {
                CompanyService cService = new CompanyService();
                if (CurrentUser.UseCompany == null || CurrentUser.UseCompany.State == CompanyState.Locked)
                {
                    cService.AddCompanyInfo(useCompany, CurrentUser.User);

                    return(ResultSuccess("操作成功."));
                }
                else
                {
                    return(ResultError("操作失败."));
                }
            }
            catch (Exception ex)
            {
                return(ResultError(ex.Message));
            }
        }