Пример #1
0
        public override void OnInitialize(InitializeEventArgs e)
        {
            //第一个进入的方法
            base.OnInitialize(e);
            this.isOpenAccount = false;
            object customParameter = this.View.OpenParameter.GetCustomParameter("Direct");

            if (customParameter != null)
            {
                string str = customParameter.ToString();
                if (!string.IsNullOrWhiteSpace(str))
                {
                    string str2 = ResManager.LoadKDString("关账", "004023030000241", SubSystemType.SCM, new object[0]);  //多语言设置,二开暂时不需要考虑
                    string str3 = ResManager.LoadKDString("反关账", "004023030000238", SubSystemType.SCM, new object[0]); //多语言设置,二开暂时不需要考虑
                    this.isOpenAccount = str.Equals("O", StringComparison.OrdinalIgnoreCase);                          //判断点击的菜单是关账还是反关账
                    this.View.SetFormTitle(new LocaleValue(this.isOpenAccount ? str3 : str2, base.Context.UserLocale.LCID));
                    this.View.SetInnerTitle(new LocaleValue(this.isOpenAccount ? str3 : str2, base.Context.UserLocale.LCID));
                    this.View.GetMainBarItem("tbAction").Text = this.isOpenAccount ? str3 : str2;//将元数据执行按钮设置它的显示内容,关账,反关账
                }
            }
            this.bShowErr = false;
            this.ShowErrGrid(this.bShowErr);
            this.View.GetControl <EntryGrid>("FEntityAction").SetFireDoubleClickEvent(true);//设置表格的双击事件,是否触发服务端
            //获取指定组织的指定系统参数,STK_StockParameter库存管理系统参数key,RecBalMidData库存关账记录中间结果key
            object obj3 = CommonServiceHelper.GetSystemProfile(base.Context, 0L, "STK_StockParameter", "RecBalMidData", false);

            this.bRecordMidData = false;
            if ((obj3 != null) && !string.IsNullOrWhiteSpace(obj3.ToString()))
            {
                this.bRecordMidData = Convert.ToBoolean(obj3);
            }
        }
Пример #2
0
 /// <summary>
 /// 界面初始化事件:判断当前进程是否为WebService调用
 /// </summary>
 /// <param name="e"></param>
 public override void OnInitialize(InitializeEventArgs e)
 {
     if (this.Context.ServiceType == WebType.WebService)
     {
         this._isWebService = true;
     }
 }
 /// <summary>
 /// 初始化,对其他界面传来的参数进行处理,对控件某些属性进行处理
 /// 这里不宜对数据DataModel进行处理
 /// </summary>
 /// <param name="e"></param>
 public override void OnInitialize(InitializeEventArgs e)
 {
     if (this.View.OpenParameter.GetCustomParameter("InitParam") != null)
     {
         Val_OpenPrm = this.View.OpenParameter.GetCustomParameter("InitParam").ToString();
     }
 }
Пример #4
0
 public override void OnInitialize(InitializeEventArgs e)
 {
     base.OnInitialize(e);
     initSql = string.Format(@"/*dialect*/ SELECT  TOP 1000 FDataSourceType,FDataSourceId,FBILLNO,FSynchroTime,FIsSuccess,FErrInfor,FDataSourceTypeDesc,b.FNAME as FHSOperateId
                                           FROM HS_T_SynchroLog a
                                           INNER JOIN T_SEC_user b on a.FHSOperateId = b.FUSERID
                                           order by  FSynchroTime desc");
 }
 /// <summary>
 /// 初始化,对其他界面传来的参数进行处理,对控件某些属性进行处理
 /// 这里不宜对数据DataModel进行处理
 /// </summary>
 /// <param name="e"></param>
 public override void OnInitialize(InitializeEventArgs e)
 {
     if (this.View.OpenParameter.GetCustomParameter("SaleOfferPrm") != null)
     {
         Val_OpenPrm = this.View.OpenParameter.GetCustomParameter("SaleOfferPrm").ToString();
         //this.View.ShowMessage(_prm);
     }
 }
Пример #6
0
 public override void OnInitialize(InitializeEventArgs e)
 {
     base.OnInitialize(e);
     this.View.GetControl <EntryGrid>("FEntity").SetRowHeight(50);
     this.View.GetControl <EntryGrid>("FEntityL").SetRowHeight(50);
     this.View.GetControl <EntryGrid>("FEntityA").SetRowHeight(50);
     this.View.GetControl <EntryGrid>("FEntityAL").SetRowHeight(50);
 }
Пример #7
0
 public void Initialize(InitializeEventArgs args)
 {
     Assert.IsFalse(WasInitialized, "Initialize was called twice.");
     WasInitialized = true;
     if (ThrowOnInitialize)
     {
         throw new ScreenMockException();
     }
 }
Пример #8
0
        public override void OnInitialize(InitializeEventArgs e)
        {
            base.OnInitialize(e);

            if (this.View.ParentFormView != null)
            {
                selectItem = this.View.OpenParameter.GetCustomParameter("SelectItem") as DynamicObject;
            }
        }
Пример #9
0
        private void OnInitialize(object sender, InitializeEventArgs args)
        {
            LogToConsole(PPLogLevel.Log, $"Hello from PepperSharp using C#");
            RequestInputEvents(PPInputEventClass.Mouse);
            int seed = 1;

            random = new Random(seed);
            CreatePalette();
        }
Пример #10
0
 private void GameClient_Initialize(object sender, InitializeEventArgs e)
 {
     _data = e.Data;
     Dispatcher.Invoke(() =>
     {
         _tbs = grid.InitializeButtonsGrid(ValueChanging);
         FillTextBoxesWithData();
         Title = $"Комната {e.RoomName}";
     });
 }
Пример #11
0
        private void OnInitialize(object sender, InitializeEventArgs args)
        {
            // Ask the device for an appropriate sample count size.
            SampleFrameCount = AudioConfig.RecommendSampleFrameCount(this, AudioSampleRate._44100, SAMPLE_FRAME_COUNT);

            var thisHandle = (IntPtr)(GCHandle.Alloc(this, GCHandleType.Normal));

            audio = new PepperSharp.Audio(this, new AudioConfig(this,
                                                                AudioSampleRate._44100, SampleFrameCount),
                                          SineWaveCallback);
        }
Пример #12
0
 /// <summary>Raises the <see cref="Initialize"/> event.
 /// </summary>
 private static void OnInitialize()
 {
     if (sm_InitializeChanged == true)
     {
         if (sm_Initialize != null) /* add currency objects: */
         {
             var eventArgs = new InitializeEventArgs();
             sm_Initialize(eventArgs);
         }
         sm_InitializeChanged = false;
     }
 }
Пример #13
0
        public override void OnInitialize(InitializeEventArgs e)
        {
            base.OnInitialize(e);

            initSql = string.Format(@"/*dialect*/  select top 1000 F_HS_UseOrgId,F_HS_B2CCUSTID,changedAmount,changedType,F_HS_TradeType,changedCause,balanceAmount
	                                                ,F_HS_RateToUSA,FSETTLECURRID,changedAmountUSA,balanceAmountUSA,a.F_HS_CNYBalance,updateTime,updateUser,FBillNo
	                                                ,fentryID,needfreezed,remark
                                                    from HS_T_customerBalance a
                                                    inner join T_BD_CURRENCY b on b.FCURRENCYID = a.FSETTLECURRID
                                                    inner join T_SEC_user c on c.FUSERID = a.updateUser
                                                    inner join T_BD_CUSTOMER d on d.FCUSTID = a.F_HS_B2CCUSTID
                                                    order by updateTime desc
                                       ");
        }
Пример #14
0
        /// <summary>Raises the <see cref="Initialize"/> event.
        /// </summary>
        private static void OnInitialize()
        {
            if (sm_InitializeChanged == true)
            {
                /* first clear all ExcelPoolItemCreater objects */
                sm_ObjectCreatorsByGuid.Clear();
                sm_ObjectCreatorsByName = new IdentifierNameableDictionary <ExcelPoolItemCreator>(100, isReadOnlyExceptAdding: true);  // clear is not allowed, it is readonly

                /* add all ExcelPoolItemCreator objects */
                if (sm_Initialize != null)
                {
                    InitializeEventArgs eventArgs = new InitializeEventArgs();
                    sm_Initialize(eventArgs);
                }
                sm_InitializeChanged = false;
            }
        }
Пример #15
0
        /// <summary>Raises the <see cref="Initialize"/> event.
        /// </summary>
        private static void OnInitialize()
        {
            if (sm_InitializeChanged == true)
            {
                /* first remove all IHolidayCalendar objects */
                sm_Pool = new IdentifierNameableDictionary <IHolidayCalendar>(100, isReadOnlyExceptAdding: true);  // clear is not allowed, it is readonly
                sm_Pool.Add(EmptyHolidayCalendar);
                sm_Pool.Add(WeekendCalendar);

                /* add all IHolidayCalendar objects */
                if (sm_Initialize != null)
                {
                    InitializeEventArgs eventArgs = new InitializeEventArgs();
                    sm_Initialize(eventArgs);
                }
                sm_InitializeChanged = false;
            }
        }
Пример #16
0
        private void OnInitialize(object sender, InitializeEventArgs args)
        {
            // Open the file system on the file_thread_. Since this is the first
            // operation we perform there, and because we do everything on the
            // file_thread_ synchronously, this ensures that the FileSystem is open
            // before any FileIO operations execute.
            messageLoop = new MessageLoop(this);
            var startTask = messageLoop.Start();

            runloop = new MessageLoop(this);
            runloop.Start();

            // Set the MessageLoop that the filesystem will run asynchronously with
            // This is not necassary though as the async will run regardless if a
            // MessageLoop is set or not.
            fileSystem.MessageLoop = messageLoop;

            OpenFileSystem();
        }
Пример #17
0
        //   DynamicObject[] lotMasters;
        //    List<long> lotEntryID = new List<long>();
        public override void OnInitialize(InitializeEventArgs e)
        {
            ids      = this.GetCustomParameterStringValue(e.Paramter.GetCustomParameter("ids"));
            lotIds   = this.GetCustomParameterStringValue(e.Paramter.GetCustomParameter("lotIds"));
            entryIds = this.GetCustomParameterStringValue(e.Paramter.GetCustomParameter("entryIds"));
            PformId  = this.GetCustomParameterStringValue(e.Paramter.GetCustomParameter("PformId"));

            //if (!entryIds.IsNullOrEmptyOrWhiteSpace())
            //{

            //    string sql = string.Format("SELECT FLOTID FROM {0} WHERE FLOTID IN (SELECT FLOT FROM T_STK_INSTOCKENTRY WHERE FENTRYID IN('{1}'))", "T_BD_LOTMASTER", string.Join(",", entryIds));
            //    using (IDataReader reader = DBUtils.ExecuteReader(this.Context, sql))
            //    {
            //        while (reader.Read())
            //        {
            //            lotEntryID.Add(reader.GetInt32(0));
            //        }
            //    }

            //    string filter = string.Format("FLOTID IN ({0})", string.Join(",", lotEntryID));
            //    OQLFilter of = OQLFilter.CreateHeadEntityFilter(filter);
            //    lotMasters = BusinessDataServiceHelper.Load(this.Context, "BD_BatchMainFile", null, of);

            //}
            //foreach (DynamicObject item in lotMasters)
            //{
            //    int i = 1;
            //    if (null != item)
            //    {
            //        this.View.Model.SetValue("F_RealLength", item["F_RealLength"],i);
            //        i = i + 1;
            //    }


            //}

            base.OnInitialize(e);
        }
Пример #18
0
 private void OnInitialize(object sender, InitializeEventArgs args)
 {
     LogToConsole(PPLogLevel.Log, "Hello from MouseCursor using C#");
     MakeCustomCursor();
 }
 public override void OnInitialize(InitializeEventArgs e)
 {
     base.OnInitialize(e);
 }
Пример #20
0
 /// <summary>
 /// 如果业务修改,只要修改此一行代码,另作实现类即可
 /// 例如:因业务变更,原有的BaseExtensionPresenter不符合需求,添加新的类 XXXBaseExtensionPresenter,
 /// 则将new BaseExtensionPresenter 改为 new XXXBaseExtensionPresenter,其他原有代码不得修改
 ///
 /// </summary>
 public override void OnInitialize(InitializeEventArgs e)
 {
     base.OnInitialize(e);
     //new BillExtensionPresenter(this);
 }
Пример #21
0
 private void OnInitialize(object sender, InitializeEventArgs args)
 {
     LogToConsole(PPLogLevel.Log, "VideoEncode");
 }
Пример #22
0
 private void OnInitialize(object sender, InitializeEventArgs args)
 {
     LogToConsoleWithSource(PPLogLevel.Log, "GamePad", "There be dragons.");
 }
 private void HandleInitialize(InitializeEventArgs <ISubject> args)
 {
     LastSubject = args.Subject;
 }
Пример #24
0
 private void OnInitialize(object sender, InitializeEventArgs args)
 {
     LogToConsoleWithSource(PPLogLevel.Log, "GettingStarted.HelloWorld", "HelloWorld from C#");
 }
Пример #25
0
 /// <summary>
 /// 接收操作给出的自定义消息对象
 /// </summary>
 /// <param name="e"></param>
 public override void OnInitialize(InitializeEventArgs e)
 {
     // 取到操作插件传出的自定义消息对象:后面需要把消息对象中的内容,显示到界面上
     this._customMessageModel = e.Paramter.GetCustomParameter("CustomMessageModel");
 }
Пример #26
0
 /// <summary>
 /// 初始化,对其他界面传来的参数进行处理,对控件某些属性进行处理
 /// 这里不宜对数据DataModel进行处理
 /// </summary>
 /// <param name="e"></param>
 public override void OnInitialize(InitializeEventArgs e)
 {
 }
Пример #27
0
        private void OnInitialize(object sender, InitializeEventArgs args)
        {
            LogToConsoleWithSource(PPLogLevel.Log, "NetworkMonitor", "There be dragons.");

            UpdateNetworkList();
        }
Пример #28
0
 private void OnInitialize(object sender, InitializeEventArgs args)
 {
     LogToConsole(PPLogLevel.Log, "VarArrayBuffer");
 }
Пример #29
0
 private void OnInitialize(object sender, InitializeEventArgs args)
 {
     LogToConsole(PPLogLevel.Log, "Hello from InputEvent using C#");
 }
Пример #30
0
 private void HandleInitialize(object sender, InitializeEventArgs args)
 {
     LogToConsole(PPLogLevel.Log, "Here be dragons");
 }
        /// <summary>
        /// XmlFormView1_Initialize. Populates the XMLFormView Webpart with initial document metadata obtained from sharepoint 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void XmlFormView1_Initialize(object sender, InitializeEventArgs e)
        {
            XPathNavigator xNavMain = XmlFormView1.XmlForm.MainDataSource.CreateNavigator();
            XmlNamespaceManager xNameSpace = new XmlNamespaceManager(new NameTable());

            xNameSpace.AddNamespace("mods", "http://www.loc.gov/mods/v3");
            xNameSpace.AddNamespace("xlinq", "http://www.w3.org/1999/xlink");

            XPathNavigator fTitle = xNavMain.SelectSingleNode(
                "mods:modsCollection[1]/mods:mods/mods:titleInfo/mods:title", xNameSpace);

            fTitle.SetValue(_itemTitle);

            if (!String.IsNullOrEmpty(_mimeType))
            {
                XPathNavigator fmediaType = xNavMain.SelectSingleNode(
                    "mods:modsCollection[1]/mods:mods/mods:physicalDescription/mods:internetMediaType", xNameSpace);
                if (fmediaType != null)
                    fmediaType.SetValue(_mimeType);
            }

            XPathNavigator fextent = xNavMain.SelectSingleNode(
                "mods:modsCollection[1]/mods:mods/mods:physicalDescription/mods:extent", xNameSpace);
            if (fextent != null)
                fextent.SetValue(_file.TotalLength.ToString() + " bytes");

            string dateIssued = "";
            if (_fileDate != "")
                dateIssued = _fileDate;
            else
                dateIssued = DateTime.Now.ToString("yyyy-MM-dd");

            XPathNavigator fdateIssued = xNavMain.SelectSingleNode(
                "mods:modsCollection[1]/mods:mods/mods:originInfo/mods:dateIssued", xNameSpace);
            if (fdateIssued != null)
                fdateIssued.SetValue(dateIssued);

            XPathNavigator fnamePart = xNavMain.SelectSingleNode(
                "mods:modsCollection[1]/mods:mods/mods:name/mods:namePart", xNameSpace);
            if (fnamePart != null)
                fnamePart.SetValue(_author);
        }