示例#1
0
        public ActionResult Update(VAdminModel vModel)
        {
            //SendType? notifyEmail = (SendType?)Request.Form["Notify_EMail"].Safe().ToNullableInt32();
            //SendType? notifySMS = (SendType?)Request.Form["Notify_SMS"].Safe().ToNullableInt32();
            //if (notifyEmail.HasValue)
            //{
            //    vModel.SendType = vModel.SendType | notifyEmail.Value;
            //}
            //if (notifySMS.HasValue)
            //{
            //    vModel.SendType = vModel.SendType | notifySMS.Value;
            //}
            MAdmin admin = new MAdmin(vModel.Id);

            admin.DAL.InfoId   = vModel.InfoId;
            admin.DAL.NodeId   = vModel.NodeId;
            admin.DAL.Remark   = vModel.Remark;
            admin.DAL.IsSend   = vModel.IsSend;
            admin.DAL.SendType = vModel.NotifyEmail | vModel.NotifySMS;
            admin.DAL.Email    = vModel.Email;
            if (!admin.Update())
            {
                return(FailResult(admin.PromptInfo.MessageStack));
            }
            return(SuccessResult());
        }
示例#2
0
        public ActionResult Add(VAdminModel vModel)
        {
            SqlSendType?notifyEmail = (SqlSendType?)Request.Form["Notify_EMail"].Safe().ToNullableInt32();
            SqlSendType?notifySMS   = (SqlSendType?)Request.Form["Notify_SMS"].Safe().ToNullableInt32();

            if (notifyEmail.HasValue)
            {
                vModel.SendType = vModel.SendType | notifyEmail.Value;
            }
            if (notifySMS.HasValue)
            {
                vModel.SendType = vModel.SendType | notifySMS.Value;
            }
            MAdmin admin = new MAdmin();

            admin.DAL.InfoId   = vModel.InfoId;
            admin.DAL.NodeId   = vModel.NodeId;
            admin.DAL.Remark   = vModel.Remark;
            admin.DAL.IsSend   = vModel.IsSend;
            admin.DAL.SendType = vModel.SendType;
            admin.DAL.Email    = vModel.Email;
            if (!admin.Add())
            {
                return(FailResult(admin.PromptInfo.MessageStack));
            }
            return(SuccessResult());
        }
        /// <summary>
        /// Init object.
        /// </summary>
        public override void Init(BreastRadiologyDocument doc, Base baseResource = null)
        {
            Composition resource = (Composition)baseResource;

            if (resource == null)
            {
                resource = new Composition();
            }
            base.Init(doc, resource);
            //+ Constructor
            this.Resource.Type = FixedValue_CompositionType();                                                                                                   // DefineBase.cs:177
            SetProfileUrl("http://hl7.org/fhir/us/breast-radiology/StructureDefinition/BreastRadComposition");                                                   // DefineBase.cs:238
            // Called from BuildMemberSection.cs, Line 225
            this.Report = new MReport(1, 1);                                                                                                                     // BuildMemberBase.cs:379
            // Called from BuildMemberSection.cs, Line 225
            this.Impressions = new MImpressions(0, -1);                                                                                                          // BuildMemberBase.cs:379
            // Called from BuildMemberSection.cs, Line 225
            this.FindingsRightBreast = new MFindingsRightBreast(0, 1);                                                                                           // BuildMemberBase.cs:379
            // Called from BuildMemberSection.cs, Line 225
            this.FindingsLeftBreast = new MFindingsLeftBreast(0, 1);                                                                                             // BuildMemberBase.cs:379
            // Called from BuildMemberSection.cs, Line 225
            this.RelatedResources = new MRelatedResources(0, -1);                                                                                                // BuildMemberBase.cs:379
            // Called from BuildMemberSection.cs, Line 225
            this.Recommendations = new MRecommendations(0, -1);                                                                                                  // BuildMemberBase.cs:379
            // Called from BuildMemberSection.cs, Line 225
            this.Admin = new MAdmin(0, -1);                                                                                                                      // BuildMemberBase.cs:379
            //- Constructor
        }
示例#4
0
        public ActionResult Update(int Id)
        {
            MAdmin admin = new MAdmin(Id);

            if (!admin.IsExist)
            {
                return(FailResult("不存在此记录"));
            }
            VAdminModel model = new VAdminModel
            {
                Id       = admin.DAL.Id,
                InfoId   = admin.DAL.InfoId,
                NodeId   = admin.DAL.NodeId,
                Remark   = admin.DAL.Remark,
                IsSend   = admin.DAL.IsSend,
                SendType = admin.DAL.SendType,
                Email    = admin.DAL.Email
            };

            return(View(model));
        }