/// <summary> /// 产品类型管理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tsbProductType_Click(object sender, EventArgs e) { if (null == productTypeWindow || productTypeWindow.IsDisposed) { productTypeWindow = new ProductTypeWindow(); productTypeWindow.MdiParent = this; productTypeWindow.StartLoad += (obj, ev) => { StartLoad(obj); }; productTypeWindow.StopLoad += (obj, ev) => { StopLoad(obj); }; productTypeWindow.ChangeType += (x, y) => { if (null != productWindow && !productWindow.IsDisposed) { productWindow.ReloadProductType(); } }; productTypeWindow.Show(); } SetSelect(tsbProductType, tsmiProductType); productTypeWindow.Activate(); }
private void DoubleClickCommand() { if (SelectProductTypeEntity != null) { ProductTypeWindow productTypeWindow = new ProductTypeWindow(SelectProductTypeEntity); productTypeWindow.Closed += productTypeModify_Close; productTypeWindow.Show(); } }
void productTypeModify_Close(object sender, EventArgs e) { ProductTypeWindow productTypeWindow = sender as ProductTypeWindow; if (productTypeWindow.DialogResult == true) { OnSaveCommand(); } }
private void OnAddCommand() { AddProductTypeEntity = new ProductTypeEntity(); AddProductTypeEntity.ProductType = new ProductManager.Web.Model.product_type(); ProductTypeWindow productTypeWindow = new ProductTypeWindow(AddProductTypeEntity); productTypeWindow.Closed += productTypeWindow_Closed; productTypeWindow.Show(); }
void productTypeWindow_Closed(object sender, EventArgs e) { ProductTypeWindow productTypeWindow = sender as ProductTypeWindow; if (productTypeWindow.DialogResult == true) { ProductTypeEntityList.Add(AddProductTypeEntity); systemManageDomainContext.product_types.Add(AddProductTypeEntity.ProductType); OnSaveCommand(); } }