Exemplo n.º 1
0
        public void ModifyFlag(long siteId, long formItemId, string[] flags)
        {
            FormItem             formItem = FormItemDAO.GetItem(formItemId);
            IEnumerable <string> oldFlags = UserFlagDAO.GetFlags(siteId, formItem.Email, formItem.Mobile, formItem.Phone, formItem.IDCard);

            if (flags == null)
            {
                flags = new string[] { }
            }
            ;
            if (oldFlags == null)
            {
                oldFlags = new string[] { }
            }
            ;

            IEnumerable <string> addFlags = flags.Except(oldFlags);

            foreach (string flag in addFlags)
            {
                UserFlagDAO.SetItem(siteId, flag, formItem.Email, formItem.Mobile, formItem.Phone, formItem.IDCard);
            }

            IEnumerable <string> delFlags = oldFlags.Except(flags);

            foreach (string flag in delFlags)
            {
                UserFlagDAO.Delete(siteId, flag, formItem.Email, formItem.Mobile, formItem.Phone, formItem.IDCard);
            }
        }
Exemplo n.º 2
0
        public ActionResult FormItemView(long siteId, long menuId, long id, bool?isEvent)
        {
            FormItem item = FormItemDAO.GetItem(id);

            ViewBag.IsEvent   = isEvent ?? false;
            ViewBag.SiteID    = siteId;
            ViewBag.MenuID    = menuId;
            ViewBag.UploadUrl = Golbal.UpdFileInfo.GetVPathByMenuID(siteId, menuId).TrimEnd('/');
            return(View(item));
        }
Exemplo n.º 3
0
        public ActionResult ModifyFlag(long siteId, long formItemId)
        {
            FormItem             formItem = FormItemDAO.GetItem(formItemId);
            IEnumerable <string> flags    = UserFlagDAO.GetFlags(siteId, formItem.Email, formItem.Mobile, formItem.Phone, formItem.IDCard);

            ViewBag.SiteID     = siteId;
            ViewBag.FormItemID = formItemId;
            ViewBag.AllFlags   = UserFlagDAO.GetFlags(siteId);
            return(View(flags));
        }
Exemplo n.º 4
0
        public ActionResult FormItemView(long siteId, long menuId, long id, byte checkStatus, string remark, bool?isEvent)
        {
            FormItem item = FormItemDAO.GetItem(id);

            item.CheckStatus = checkStatus;
            item.Remark      = remark;
            FormItemDAO.SetItem(item);

            ViewBag.IsEvent   = isEvent ?? false;
            ViewBag.SiteID    = siteId;
            ViewBag.MenuID    = menuId;
            ViewBag.UploadUrl = Golbal.UpdFileInfo.GetVPathByMenuID(siteId, menuId).TrimEnd('/');

            ViewBag.Exit = true;
            return(View(item));
        }
Exemplo n.º 5
0
        public ActionResult FormItemEdit(long siteId, long menuId, long formId, long?id, bool?isEvent)
        {
            FormItem item = null;

            if (id != null)
            {
                item = FormItemDAO.GetItem((long)id);
            }

            if (item == null)
            {
                item = new FormItem {
                    ID = WorkLib.GetItem.NewSN(), FormID = formId, IsBack = true
                }
            }
            ;

            ViewBag.IsEvent   = isEvent ?? false;
            ViewBag.SiteID    = siteId;
            ViewBag.MenuID    = menuId;
            ViewBag.UploadUrl = Golbal.UpdFileInfo.GetVPathByMenuID(siteId, menuId).TrimEnd('/');
            return(View(item));
        }