예제 #1
0
        public ActionResult FieldSetting(long formId, string type, long?id)
        {
            FieldModel field = null;

            if (id != null)
            {
                field = FieldDAO.GetItem((long)id);
            }

            if (field == null)
            {
                field = new FieldModel {
                    ID = WorkLib.GetItem.NewSN(), TypeID = type, Width = (int)WorkV3.Common.FieldWidth.Half, High = (int)WorkV3.Common.FieldHeight.五行, RepeatLimit = (byte)FieldRepeatLimit.可任意報名
                };
            }

            FormModel form = FormDAO.GetItem(formId);

            ViewBag.UploadUrl    = Golbal.UpdFileInfo.GetVPathBySiteID((long)form.SiteID, formDesignFileDir).TrimEnd('/');
            ViewBag.SiteID       = form.SiteID;
            ViewBag.MenuID       = form.SourceID;
            ViewBag.FormID       = formId;
            ViewBag.CustomFolder = formDesignFileDir;
            return(View($"Field{ type }", field));
        }
예제 #2
0
        public ActionResult FieldCopy(long id)
        {
            FieldModel field = FieldDAO.GetItem(id);

            field.ID = WorkLib.GetItem.NewSN();

            FieldDAO.SetItem(field);

            FormModel form = FormDAO.GetItem(field.ParentID);

            ViewBag.UploadDesignUrl = Golbal.UpdFileInfo.GetVPathBySiteID((long)form.SiteID, formDesignFileDir).TrimEnd('/');

            return(View("FieldDesignView", new FieldModel[] { field }));
        }