コード例 #1
0
        public ActionResult UpLoadHandout(SoftProjectAreaEntityDomain domain)
        {
            #region 保存文件
            if (domain.Item.RefPKTableGuid == null)
            {
                throw new Exception("附件Guid不能为空");
            }
            domain.Item.AttachmentFileSizeDisp = ProjectCommon.FileSizeDisp(domain.Item.AttachmentFileSize);
            ModularOrFunCode           = "MarketingAreas.M_MarketingAttachment.Upload";
            domain.Design_ModularOrFun = Design_ModularOrFun;
            var respadd = domain.AddSave();
            #endregion

            #region 查询
            if (respadd.Item.M_MarketingAttachmentID == null)
            {
                throw new Exception("添加失败");
            }
            domain.Item.M_MarketingAttachmentID = respadd.Item.M_MarketingAttachmentID;
            ModularOrFunCode           = "MarketingAreas.M_MarketingAttachment.IndexEdit";
            domain.Design_ModularOrFun = Design_ModularOrFun;
            var resp = domain.ByID();

            resp.Items.Add(resp.Item);
            resp.FunNameEn       = "Detail";
            resp.ViewContextName = Design_ModularOrFun.PartialView;

            #endregion
            return(View("Rows", resp));
        }
コード例 #2
0
        public ActionResult UpLoad(SoftProjectAreaEntityDomain domain)
        {
            #region 保存文件

            if (domain.Item.Doc_BaseDocmentID == null)
            {
                throw new Exception("文档ID不能为空");
            }
            domain.Item.AttachmentFileSizeDisp = ProjectCommon.FileSizeDisp(domain.Item.AttachmentFileSize);
            ModularOrFunCode           = "DocArea.Doc_BaseDocmentAttachment.Upload";
            domain.Design_ModularOrFun = Design_ModularOrFun;
            var respadd = domain.AddSave();
            #endregion

            #region 查询
            if (respadd.Item.Doc_BaseDocmentAttachmentID == null)
            {
                throw new Exception("添加失败");
            }
            domain.Item.Doc_BaseDocmentAttachmentID = respadd.Item.Doc_BaseDocmentAttachmentID;
            ModularOrFunCode           = "DocArea.Doc_BaseDocmentAttachment.Index";
            domain.Design_ModularOrFun = Design_ModularOrFun;
            var resp = domain.ByID();

            resp.Items.Add(resp.Item);
            resp.FunNameEn       = "Detail";
            resp.ViewContextName = Design_ModularOrFun.PartialView;

            #endregion
            return(View("Rows", resp));
        }
コード例 #3
0
        public ActionResult UpLoad(SoftProjectAreaEntityDomain domain)
        {
            #region 原代码

            //#region 保存文件

            //if (domain.Item.P_ProductID == null)
            //    throw new Exception("ID不能为空");
            //domain.Item.AttachmentFileSizeDisp = ProjectCommon.FileSizeDisp(domain.Item.AttachmentFileSize);
            //ModularOrFunCode = "ProductAreas.P_ProductAttachment.Upload";
            //domain.Design_ModularOrFun = Design_ModularOrFun;
            //var respadd = domain.AddSave();
            //#endregion

            //#region 查询
            //if (respadd.Item.P_ProductAttachmentID == null)
            //    throw new Exception("添加失败");
            //domain.Item.Doc_DocmentAttachmentID = respadd.Item.Doc_DocmentAttachmentID;
            //ModularOrFunCode = "ProductAreas.P_ProductAttachment.Index";
            //domain.Design_ModularOrFun = Design_ModularOrFun;
            //var resp = domain.ByID();

            //resp.Items.Add(resp.Item);
            //resp.FunNameEn = "Detail";
            //resp.ViewContextName = Design_ModularOrFun.PartialView;

            //#endregion
            //return View("Rows", resp);
            #endregion
            ///////////////////////////////////////////
            #region 保存文件
            if (domain.Item.RefPKTableGuid == null)
            {
                throw new Exception("附件Guid不能为空");
            }
            domain.Item.AttachmentFileSizeDisp = ProjectCommon.FileSizeDisp(domain.Item.AttachmentFileSize);
            ModularOrFunCode           = "ProductAreas.P_ProductAttachment.Upload";
            domain.Design_ModularOrFun = Design_ModularOrFun;
            var respadd = domain.AddSave();
            #endregion

            #region 查询
            if (respadd.Item.P_ProductAttachmentID == null)
            {
                throw new Exception("添加失败");
            }
            domain.Item.P_ProductAttachmentID = respadd.Item.P_ProductAttachmentID;
            ModularOrFunCode           = "ProductAreas.P_ProductAttachment.IndexEdit";
            domain.Design_ModularOrFun = Design_ModularOrFun;
            var resp = domain.ByID();

            resp.Items.Add(resp.Item);
            resp.FunNameEn       = "Detail";
            resp.ViewContextName = Design_ModularOrFun.PartialView;

            #endregion
            return(View("Rows", resp));
        }