private void OnAddCommand() { AddProductPartTypeEntity = new ProductPartTypeEntity(); AddProductPartTypeEntity.ProductPartType = new ProductManager.Web.Model.product_part_type(); ProductPartTypeWindow productPartTypeWindow = new ProductPartTypeWindow(AddProductPartTypeEntity); productPartTypeWindow.Closed += productPartTypeWindow_Closed; productPartTypeWindow.Show(); }
private void DoubleClickCommand() { if (SelectProductPartTypeEntity != null) { ProductPartTypeWindow productPartTypeWindow = new ProductPartTypeWindow(SelectProductPartTypeEntity); productPartTypeWindow.Closed += productPartTypeModify_Closed; productPartTypeWindow.Show(); } }
private void productPartTypeModify_Closed(object sender, EventArgs e) { ProductPartTypeWindow productPartTypeWindow = sender as ProductPartTypeWindow; if (productPartTypeWindow.DialogResult == true) { OnSaveCommand(); } }
void productPartTypeWindow_Closed(object sender, EventArgs e) { ProductPartTypeWindow productPartTypeWindow = sender as ProductPartTypeWindow; if (productPartTypeWindow.DialogResult == true) { ProductPartTypeEntityList.Add(AddProductPartTypeEntity); systemManageDomainContext.product_part_types.Add(AddProductPartTypeEntity.ProductPartType); OnSaveCommand(); } }
private void OnModifyCommand() { if (SelectProductPartTypeEntity != null) { ProductPartTypeWindow productPartTypeWindow = new ProductPartTypeWindow(SelectProductPartTypeEntity); productPartTypeWindow.Closed += productPartTypeModify_Closed; productPartTypeWindow.Show(); } }