Example #1
0
            public void LogUserIn(string accid, AccountantBase auth)
            {
                ACL_DOC_TYPE acl = auth.BuildXmlDocAcl(accid, xmldocacl);

                LIMITS_TYPE[] limits = auth.BuildXmlDocLimit(accid, xmldoclimits);

                MFPCoreWSEx mfpWS = GetConfiguredMfpCoreWS();

                mfpWS.EnableDevice(acl, limits);

                mfpWS.ShowScreen(E_MFP_SHOWSCREEN_TYPE.TOP_LEVEL_SCREEN);
            }
Example #2
0
            public void InitializeMfp(string myUrl)
            {
                E_EVENT_ID_TYPE event_type = E_EVENT_ID_TYPE.ON_JOB_COMPLETED;

                ACCESS_POINT_TYPE sink_url = new ACCESS_POINT_TYPE();

                sink_url.URLType = E_ADDRESSPOINT_TYPE.SOAP;
                sink_url.Value   = myUrl;

                MFPCoreWSEx mfpWS = GetConfiguredMfpCoreWS();

                mfpWS.Subscribe(null, event_type, sink_url, true);
            }
        private void CallEnableDevice(string jobType, int numPages, string jobMainType, string jobSubType)
        {
            string userSysID = Session["UserSystemID"] as string;
            string device    = Session["DeviceID"] as string;

            if (string.IsNullOrEmpty(device))
            {
                device = Request.Params["DeviceId"] as string;
                string[] deviceids = device.Split(',');
                device = deviceids[0].ToString();
            }

            Helper.DeviceSession.Get(device).LogUserInDeviceModeforCampus(userSysID, jobType, numPages, new Helper.MyAccountant(), true, false, jobMainType, jobSubType);
            return;

            #region trial
            ACL_DOC_TYPE  xmldocacl;
            LIMITS_TYPE[] xmldoclimits;

            string accid = Session["UserSystemID"] as string;
            if (!Helper.UserAccount.Has(accid))
            {
                Helper.UserAccount.Create(accid, "", "", "Cost Center", "MFP");
            }
            AccountantBase auth = new Helper.MyAccountant();

            string uuid = Session["DeviceID"] as string;
            xmldocacl = Helper.DeviceSession.Get(uuid).xmldocacl;
            ACL_DOC_TYPE acl = auth.BuildXmlDocAclCampus(accid, jobType, xmldocacl);

            xmldoclimits = Helper.DeviceSession.Get(uuid).xmldoclimits;
            LIMITS_DOC_TYPE limitDocType = new LIMITS_DOC_TYPE();
            limitDocType.limits = auth.BuildXmlDocLimit(accid, xmldoclimits);

            MFPCoreWSEx mfpWS = Helper.DeviceSession.Get(uuid).GetConfiguredMfpCoreWS();
            try
            {
                mfpWS.EnableDevice(acl, limitDocType);
                mfpWS.ShowScreen(E_MFP_SHOWSCREEN_TYPE.TOP_LEVEL_SCREEN);
            }
            catch (Exception ex)
            {
                string exception = ex.Message;
            }
            #endregion
        }