Exemplo n.º 1
0
        private void InitialParam()
        {
            string logid    = string.Empty;
            string userName = string.Empty;

            if (NG3.AppInfoBase.UP != null)
            {
                logid    = NG3.AppInfoBase.LoginID;
                userName = NG3.AppInfoBase.UserName;
            }

            //web.config配置节点标识附件服务器的站点
            string busWebsite = System.Configuration.ConfigurationManager.AppSettings["BusWebSite"];

            if (!string.IsNullOrWhiteSpace(busWebsite))
            {
                ViewBag.product = busWebsite;
            }
            else
            {
                ViewBag.product = product;
            }

            ViewBag.fill        = logid;
            ViewBag.fillname    = userName;
            ViewBag.btnAdd      = System.Web.HttpContext.Current.Request.Params["btnAdd"];//是否有新增按钮,'1'或者'0'
            ViewBag.status      = System.Web.HttpContext.Current.Request.Params["status"];
            ViewBag.btnwebok    = System.Web.HttpContext.Current.Request.Params["btnWebOk"];
            ViewBag.autosave    = System.Web.HttpContext.Current.Request.Params["autoSave"];
            ViewBag.fileNum     = System.Web.HttpContext.Current.Request.Params["fileNum"];     //附件数量
            ViewBag.Height      = System.Web.HttpContext.Current.Request.Params["Height"];      //窗口高度
            ViewBag.btnScan     = System.Web.HttpContext.Current.Request.Params["btnScan"];
            ViewBag.btnDelete   = System.Web.HttpContext.Current.Request.Params["btnDelete"];   //删除按钮
            ViewBag.btnEdit     = System.Web.HttpContext.Current.Request.Params["btnEdit"];     //修改按钮
            ViewBag.btnView     = System.Web.HttpContext.Current.Request.Params["btnView"];     //查看按钮
            ViewBag.btnDownload = System.Web.HttpContext.Current.Request.Params["btnDownload"]; //查看按钮

            string attachTableName = System.Web.HttpContext.Current.Request.Params["attachTName"];
            string busTableName    = System.Web.HttpContext.Current.Request.Params["busTName"];
            string busid           = System.Web.HttpContext.Current.Request.Params["busid"];

            ViewBag.guid = busid;

            string attachGuid = System.Web.HttpContext.Current.Request.Params["attachguid"]; //由客户端生成传过来
            string guid       = string.Empty;                                                //

            if (!string.IsNullOrEmpty(attachGuid))
            {
                guid = attachGuid;
            }
            else
            {
                guid = Guid.NewGuid().ToString();//查看时客户端可能不传guid,自己生成guid,自己控制,init方法也返回这个guid
            }

            string fileConnect = ConfigurationManager.AppSettings["FileDBConnectString"];

            string bustypecode = System.Web.HttpContext.Current.Request.Params["bustypecode"] == null ? string.Empty : System.Web.HttpContext.Current.Request.Params["bustypecode"]; //业务类型编码
            string orgid       = System.Web.HttpContext.Current.Request.Params["orgid"] == null ? "0" : System.Web.HttpContext.Current.Request.Params["orgid"];                      //组织phid
            string busurl      = System.Web.HttpContext.Current.Request.Params["busurl"] == null ? string.Empty : System.Web.HttpContext.Current.Request.Params["busurl"];           //业务单据url
            string asr_where   = string.Empty;

            ViewBag.guid = proxy.Init3(guid, attachTableName, busTableName, busid, logid, userName, string.IsNullOrWhiteSpace(fileConnect) ? NG3.AppInfoBase.UserConnectString : fileConnect, bustypecode, orgid, busurl, asr_where);
        }