コード例 #1
0
        public ActionResult Index(string id)
        {
            var label = labelProvider.GetLabelDetail(id);

            if (label == null)
            {
                return(HttpNotFound());
            }

            var model = new LabelDetailModel {
                Label = label
            };

            return(View(model));
        }
コード例 #2
0
        public static LabelDetailModel MapLabelDetailModel(LabelDto dto)
        {
            var model = new LabelDetailModel();

            model.OrganizationUid  = dto.OrganizationUid;
            model.OrganizationName = dto.OrganizationName;

            model.ProjectUid  = dto.ProjectUid;
            model.ProjectName = dto.ProjectName;

            model.LabelUid            = dto.Uid;
            model.Key                 = dto.Key;
            model.Description         = dto.Description;
            model.IsActive            = dto.IsActive;
            model.IsActiveInput.Value = dto.IsActive;

            model.LabelTranslationCount = dto.LabelTranslationCount;

            model.SetInputModelValues();
            return(model);
        }