Ejemplo n.º 1
0
 public ContentResult DetailTempSave(string detail)
 {
     try
     {
         int rtn = 0;;
         SYSCompanyProfile Profile = SYSCompanyProfile.GetProfile();
         if (Profile == null)
         {
             Profile     = new SYSCompanyProfile();
             Profile.Tmp = detail;
             rtn         = Profile.InsertAndReturnIdentity();
         }
         else
         {
             rtn = SYSCompanyProfile.SaveTmp(detail);
         }
         if (rtn > 0)
         {
             return(Content("ok"));
         }
         return(Content("网络异常"));
     }
     catch (Exception ex)
     {
         Log.Instance.Write(ex.ToString(), "SYSCompanyProfile_DetailTempSave_error");
         return(Content("网络异常"));
     }
 }
Ejemplo n.º 2
0
        public ContentResult GetDetailTemp()
        {
            SYSCompanyProfile Profile = SYSCompanyProfile.GetProfile();

            if (Profile != null)
            {
                return(Content(Profile.Tmp));
            }
            return(Content(""));
        }
Ejemplo n.º 3
0
        public ActionResult Index()
        {
            SYSCompanyProfile Profile = SYSCompanyProfile.GetProfile();

            if (Profile == null)
            {
                Profile = new SYSCompanyProfile();
            }
            return(View(Profile));
        }
Ejemplo n.º 4
0
        public ContentResult Save(SYSCompanyProfile Profile)
        {
            int rtn = 0;

            if (Profile.ID == 0)
            {
                rtn = Profile.InsertAndReturnIdentity();
            }
            else
            {
                rtn = Profile.UpdateByID();
            }
            if (rtn > 0)
            {
                return(Content("ok"));
            }
            return(Content("保存失败"));
        }