protected virtual void OnMinMaxChanged() { if (OwnerEdit != null) { OwnerEdit.OnMinMaxChanged(); } }
void ClosePopup() { if (OwnerEdit != null) { OwnerEdit.ClosePopup(); } }
public override void SetFilter(string filter, string columnName) { this.currentFilter = filter; TreeList.FilterNodes(); if (TreeList.VisibleNodesCount == 0) { OwnerEdit.ClosePopup(PopupCloseMode.Cancel); } }
public bool UpdateOwner(OwnerEdit model) { using (var ctx = new ApplicationDbContext()) { var owner = ctx.Owners.Single(o => o.OwnerId == model.OwnerId); owner.OwnerName = model.OwnerName; return(ctx.SaveChanges() == 1); } }
void OnTreeListDoubleClick(object sender, EventArgs e) { TreeListHitInfo hi = TreeList.CalcHitInfo(TreeList.PointToClient(Control.MousePosition)); if (hi.HitInfoType == HitInfoType.Cell && GetSelectedDataItem() is TreeListLeaf) { OwnerEdit.ClosePopup(PopupCloseMode.Normal); } }
public void UpdateDataSource() { if (Properties == null) { return; } IList dataSource = OwnerEdit.GetDataSource(OwnerEdit.EditingObject); ListBox.DataSource = dataSource ?? Properties.Items; }
void openButton_Click(object sender, EventArgs e) { System.Windows.Forms.DialogResult res = openFile.ShowDialog(); OwnerEdit.ShowPopup(); if (res == System.Windows.Forms.DialogResult.OK) { LoadImage(openFile.FileName); Invalidate(); } }
public override void ProcessKeyDown(KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { e.Handled = true; OwnerEdit.ClosePopup(); return; } base.ProcessKeyDown(e); }
public bool UpdateOwner(OwnerEdit model) { using (var ctx = new ApplicationDbContext()) { var entity = ctx .Owners .Single(e => e.OwnerId == model.OwnerId && e.Id == _Id); entity.ProfileName = model.ProfileName; entity.Phone = model.Phone; entity.Email = model.Email; return(ctx.SaveChanges() == 1); } }
///<summary>Raises the ButtonClick event.</summary> protected override void RaiseButtonClick(ButtonPressedEventArgs e) { base.RaiseButtonClick(e); if (e.Button.Index == 1) { var person = OwnerEdit.PromptNew(); if (person != null && !RaisePersonSelecting(person, PersonSelectionReason.Created)) { return; } OwnerEdit.EditValue = person; OwnerEdit.IsModified = true; //Force validation in order to commit the new value for databinding OwnerEdit.DoValidate(); } }
public IHttpActionResult Put(OwnerEdit ownerprofile) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var service = CreateOwnerService(); if (!service.UpdateOwner(ownerprofile)) { return(InternalServerError()); } return(Ok()); }
public ActionResult Edit(int id, OwnerEdit model) { if (!ModelState.IsValid) { return(View(model)); } if (model.OwnerId != id) { ModelState.AddModelError("", "Id incorrect"); return(View(model)); } if (new OwnerService().UpdateOwner(model)) { TempData["SaveResult"] = "Owner has been updated"; return(RedirectToAction("Index")); } ModelState.AddModelError("", "Error updating this owner"); return(View(model)); }
protected virtual void OnImageAnimation(BaseAnimationInfo animInfo) { IAnimatedItem animItem = this; EditorAnimationInfo info = animInfo as EditorAnimationInfo; if (Image == null || OwnerEdit == null || info == null) { return; } if (!info.IsFinalFrame) { Image.SelectActiveFrame(FrameDimension.Time, info.CurrentFrame); OwnerEdit.Invalidate(animItem.AnimationBounds); } else { StopAnimation(); StartAnimation(); } }
protected void UpdateShadows() { if (OwnerEdit == null) { return; } bool visible = Visible && Bounds.X != -10000; if (visible) { Rectangle r = OwnerEdit.RectangleToScreen(OwnerEdit.ClientRectangle); if (!OwnerEdit.Bounds.IsEmpty) { r = OwnerEdit.RectangleToScreen(new Rectangle(Point.Empty, OwnerEdit.Bounds.Size)); } FAShadow.CreateShadows(Shadows, FAShadow.DefaultShadowSize, true, this, r); } else { FAShadow.HideShadows(Shadows); } }
void customButton_OkClick(object sender, EventArgs e) { OwnerEdit.ClosePopup(); }
void customButton_CancelClick(object sender, EventArgs e) { OwnerEdit.CancelPopup(); }
protected override void OnOkButtonClick( ) { base.OnOkButtonClick(); OwnerEdit.EditValue = null; OwnerEdit.ClosePopup(); }
public void DataBind(System.Data.DataTable dataSource, string displayMember, string valueMember, string dropDisplayName, string sortMember, string[] colFields, string[] captions) { OwnerEdit.DataBind(dataSource, displayMember, valueMember, dropDisplayName, sortMember, colFields, captions); }