protected override void OnUpdatingRow(UpdatingEventArgs e) { base.OnUpdatingRow(e); switch (e.Status) { case UpdateKind.Delete: break; case UpdateKind.Insert: e.Row["Id"] = CreateUniId(); e.Row["CreateId"] = e.Row["UpdateId"] = BaseGlobalVariable.UserId; e.Row["CreateDate"] = e.Row["UpdateDate"] = DateTime.Now; e.Row["Active"] = 1; break; case UpdateKind.Update: e.Row["UpdateId"] = BaseGlobalVariable.UserId; e.Row["UpdateDate"] = DateTime.Now; break; default: break; } }
protected override void OnUpdatingRow(UpdatingEventArgs e) { base.OnUpdatingRow(e); TaxDocumentResolver resolver; DataRow docRow; switch (e.Status) { case UpdateKind.Update: int flag = e.Row["SendFlag"].Value<int>(); if (flag == 0) { resolver = new TaxDocumentResolver(Source); NonUIResolvers.NonUIResolvers.Add(resolver); docRow = resolver.SelectRowWithKeys(e.Row["DocId"]); docRow["MassFlag"] = 1; resolver.SetCommands(AdapterCommand.Update); e.Row["SendFlag"] = 1; } break; case UpdateKind.Delete: resolver = new TaxDocumentResolver(Source); NonUIResolvers.NonUIResolvers.Add(resolver); docRow = resolver.SelectRowWithKeys(e.Row["DocId"]); docRow.BeginEdit(); docRow["MassFlag"] = 0; docRow["MassId"] = DBNull.Value; docRow.EndEdit(); resolver.SetCommands(AdapterCommand.Update); break; } }
private void OnSurfaceUpdating(UpdatingEventArgs args) { if (IsEnabled || UpdateIfDisabled) { Update(args.DeltaTime); } }
protected override void OnUpdatingRow(UpdatingEventArgs e) { base.OnUpdatingRow(e); TaxDocumentResolver resolver; DataRow docRow; switch (e.Status) { case UpdateKind.Update: int flag = e.Row["SendFlag"].Value <int>(); if (flag == 0) { resolver = new TaxDocumentResolver(Source); NonUIResolvers.NonUIResolvers.Add(resolver); docRow = resolver.SelectRowWithKeys(e.Row["DocId"]); docRow["MassFlag"] = 1; resolver.SetCommands(AdapterCommand.Update); e.Row["SendFlag"] = 1; } break; case UpdateKind.Delete: resolver = new TaxDocumentResolver(Source); NonUIResolvers.NonUIResolvers.Add(resolver); docRow = resolver.SelectRowWithKeys(e.Row["DocId"]); docRow.BeginEdit(); docRow["MassFlag"] = 0; docRow["MassId"] = DBNull.Value; docRow.EndEdit(); resolver.SetCommands(AdapterCommand.Update); break; } }
protected override void OnUpdatingRow(UpdatingEventArgs e) { base.OnUpdatingRow(e); switch (e.Status) { //case UpdateKind.Delete: // int roleid = GlobalVariable.Request.QueryString["ID"].Value<int>(); // string error = IsUseingRole(roleid); // if (!string.IsNullOrEmpty(error)) // { // throw new ErrorPageException("删除操作被禁止", "该角色不能删除,因为已经被如下用户分配: " + error); // } // else // { // break; // } case UpdateKind.Insert: e.Row["Id"] = CreateUniId(); break; case UpdateKind.Update: break; default: break; } }
protected virtual void OnUpdating(UpdatingEventArgs e) { EventHandler <UpdatingEventArgs> handler = Updating; if (handler != null) { handler(this, e); } }
/// <summary> /// 在表发生新建、修改和删除的时候触动。注意,千万不要删除base.OnUpdatingRow(e); /// UpdatingRow事件附着在基类该函数中。 /// </summary> /// <param name="e">事件参数</param> protected override void OnUpdatingRow(UpdatingEventArgs e) { base.OnUpdatingRow(e); switch (e.Status) { case UpdateKind.Insert: break; case UpdateKind.Update: break; } }
/// <summary> /// 在表发生新建、修改和删除的时候触动。注意,千万不要删除base.OnUpdatingRow(e); /// UpdatingRow事件附着在基类该函数中。 /// </summary> /// <param name="e">事件参数</param> protected override void OnUpdatingRow(UpdatingEventArgs e) { base.OnUpdatingRow(e); switch (e.Status) { case UpdateKind.Insert: e.Row["WG_ID"] = Context.GetUniId(TableName); break; case UpdateKind.Update: break; } }
/// <summary> /// 在表发生新建、修改和删除的时候触动。注意,千万不要删除base.OnUpdatingRow(e); /// UpdatingRow事件附着在基类该函数中。 /// </summary> /// <param name="e">事件参数</param> protected override void OnUpdatingRow(UpdatingEventArgs e) { base.OnUpdatingRow(e); switch (e.Status) { case UpdateKind.Insert: //e.Row["WU_OPEN_ID"] = Context.GetUniId(TableName); break; case UpdateKind.Update: break; } }
/// <summary> /// 在表发生新建、修改和删除的时候触动。注意,千万不要删除base.OnUpdatingRow(e); /// UpdatingRow事件附着在基类该函数中。 /// </summary> /// <param name="e">事件参数</param> protected override void OnUpdatingRow(UpdatingEventArgs e) { base.OnUpdatingRow(e); switch (e.Status) { case UpdateKind.Insert: e.Row["WM_ID"] = Context.GetUniId(TableName); e.Row["WM_CREATE_DATE"] = DateTime.Now; break; case UpdateKind.Update: break; } }
protected override void OnUpdatingRow(UpdatingEventArgs e) { base.OnUpdatingRow(e); switch (e.Status) { case UpdateKind.Insert: e.Row["SugId"] = CreateUniId(); e.Row["CreateDate"] = DateTime.Now; break; case UpdateKind.Update: break; case UpdateKind.Delete: break; } }
private void SurfaceOnUpdating(UpdatingEventArgs args) { try { lock (_modules) { // Update all active modules foreach (var module in _modules) { module.Update(args.DeltaTime); } } // If there is no ready bitmap brush, skip the frame if (_rgbService.BitmapBrush == null) { return; } lock (_rgbService.BitmapBrush) { if (_rgbService.BitmapBrush.Bitmap == null) { return; } // Render all active modules using (var canvas = new SKCanvas(_rgbService.BitmapBrush.Bitmap)) { canvas.Clear(new SKColor(0, 0, 0)); lock (_modules) { foreach (var module in _modules) { module.Render(args.DeltaTime, _surfaceService.ActiveSurface, canvas); } } OnFrameRendering(new FrameRenderingEventArgs(_modules, canvas, args.DeltaTime, _rgbService.Surface)); } } } catch (Exception e) { throw new ArtemisCoreException("Exception during update", e); } }
protected override void OnUpdatingRow(UpdatingEventArgs e) { base.OnUpdatingRow(e); switch (e.Status) { case UpdateKind.Delete: break; case UpdateKind.Insert: e.Row["Id"] = CreateUniId(); break; case UpdateKind.Update: break; default: break; } }
protected override void OnUpdatingRow(UpdatingEventArgs e) { base.OnUpdatingRow(e); switch (e.Status) { case UpdateKind.Insert: e.Row["SortId"] = 0; e.Row["PrevContent"] = GetPreviewData(e.Row["Content"].ToString()); e.Row["MassFlag"] = 0; break; case UpdateKind.Update: e.Row["PrevContent"] = GetPreviewData(e.Row["Content"].ToString()); break; case UpdateKind.Delete: break; } }
/// <summary> /// 在表发生新建、修改和删除的时候触动。注意,千万不要删除base.OnUpdatingRow(e); /// UpdatingRow事件附着在基类该函数中。 /// </summary> /// <param name="e">事件参数</param> protected override void OnUpdatingRow(UpdatingEventArgs e) { base.OnUpdatingRow(e); CorpUser user = new CorpUser(); switch (e.Status) { case UpdateKind.Insert: e.Row["Department"] = "\"1\""; user.ReadFromDataRow(e.Row, WeCorpConst.USER_MODE); fUserList.Add(UpdateKind.Insert, user); break; case UpdateKind.Update: user.ReadFromDataRow(e.Row, WeCorpConst.USER_MODE); fUserList.Add(e.InvokeMethod, user); break; } }
protected override void OnUpdatingRow(UpdatingEventArgs e) { base.OnUpdatingRow(e); switch (e.Status) { case UpdateKind.Delete: break; case UpdateKind.Insert: e.Row["Id"] = CreateUniId(); break; case UpdateKind.Update: //if (string.IsNullOrEmpty(e.Row["FN_PARENT_ID"].ToString())) // e.Row["FN_PARENT_ID"] = RootId; break; default: break; } }
private void SurfaceOnUpdating(UpdatingEventArgs args) { try { var modules = _pluginService.GetPluginsOfType <Module>(); // Update all active modules foreach (var module in modules) { module.Update(args.DeltaTime); } // If there is no graphics decorator, skip the frame if (_rgbService.GraphicsDecorator == null) { return; } // Render all active modules using (var g = _rgbService.GraphicsDecorator.GetGraphics()) { // If there are no graphics, skip the frame if (g == null) { return; } g.Clear(Color.Black); foreach (var module in modules) { module.Render(args.DeltaTime, _rgbService.Surface, g); } } } catch (Exception e) { throw new ArtemisCoreException("Exception during update", e); } }
public void Handle(UpdatingEventArgs e) { ProtoService.SetMessageOnTime(5, "Updating..."); }
private void SurfaceOnUpdating(UpdatingEventArgs args) { if (_rgbService.IsRenderPaused) { return; } try { _frameStopWatch.Restart(); lock (_dataModelExpansions) { // Update all active modules, check Enabled status because it may go false before before the _dataModelExpansions list is updated foreach (BaseDataModelExpansion dataModelExpansion in _dataModelExpansions.Where(e => e.Enabled)) { dataModelExpansion.Update(args.DeltaTime); } } List <Module> modules; lock (_modules) { modules = _modules.Where(m => m.IsActivated || m.InternalExpandsMainDataModel) .OrderBy(m => m.PriorityCategory) .ThenByDescending(m => m.Priority) .ToList(); } // Update all active modules foreach (Module module in modules) { module.InternalUpdate(args.DeltaTime); } // If there is no ready bitmap brush, skip the frame if (_rgbService.BitmapBrush == null) { return; } lock (_rgbService.BitmapBrush) { if (_rgbService.BitmapBrush.Bitmap == null) { return; } // Render all active modules using SKCanvas canvas = new SKCanvas(_rgbService.BitmapBrush.Bitmap); canvas.Clear(new SKColor(0, 0, 0)); if (!ModuleRenderingDisabled) { // While non-activated modules may be updated above if they expand the main data model, they may never render foreach (Module module in modules.Where(m => m.IsActivated)) { module.InternalRender(args.DeltaTime, _surfaceService.ActiveSurface, canvas, _rgbService.BitmapBrush.Bitmap.Info); } } OnFrameRendering(new FrameRenderingEventArgs(modules, canvas, args.DeltaTime, _rgbService.Surface)); } } catch (Exception e) { throw new ArtemisCoreException("Exception during update", e); } finally { _frameStopWatch.Stop(); FrameTime = _frameStopWatch.Elapsed; } }
private void OnUpdatingChanged(object sender, UpdatingEventArgs e) { if (!_updater.Updating) { SetText("Start application..."); System.Diagnostics.Process proc = System.Diagnostics.Process.Start(System.IO.Path.Combine(_appPath, "App.exe")); Application.Exit(); } }
protected virtual void OnUpdating(UpdatingEventArgs e) { Updating?.Invoke(this, e); }
private void OnUpdatingChanged(object sender, UpdatingEventArgs e) { if (!_updater.Updating) { SetText("Start application..."); System.IO.Directory.SetCurrentDirectory(_appPath); System.Diagnostics.Process proc = System.Diagnostics.Process.Start("App.exe"); Application.Exit(); } }