コード例 #1
0
        public async Task <ActionResult> InsertUpdateEmailSignature()
        {
            try
            {
                var            modelStr = Request["model"];
                EmailSignature model    = JsonConvert.DeserializeObject <EmailSignature>(modelStr);

                byte[] data = Convert.FromBase64String(model.Signature);
                model.Signature = Encoding.UTF8.GetString(data);

                ClaimTeamLoginModel client = Session[SessionHelper.claimTeamLogin] as ClaimTeamLoginModel;
                model.UserId = client.UserId;
                EmailServices services = new EmailServices();
                bool          response = await services.InsertUpdateEmailSignature(model);

                return(Json(response, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                return(Json(null, JsonRequestBehavior.AllowGet));
            }
        }