// edit existing group private void EditGroup() { try { GenaricRepository<Group> _repository = new GenaricRepository<Group>(new ItrackContext()); _repository.Edit(AssignGroup()); } catch (Exception ex) { Debug.WriteLine(ex.Message); MessageBox.Show(ex.Message, "Error - C-0002", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
/// <summary> /// edit marker details selecting by griud view.get id form grid view by user selection /// </summary> /// <param name="id"></param> private void EditCuttingItem(int id) { try { GenaricRepository<CuttingItem> _CuttingItemrRepo = new GenaricRepository<CuttingItem>(new ItrackContext()); /* _cuttingItem.CuttingHeaderID = item.CuttingHeaderID; _cuttingItem.CuttingItemID = item.CuttingItemID; _cuttingItem.MarkerNo = item.MarkerNo; _cuttingItem.MarkerWidth = item.MarkerWidth; _cuttingItem.MarkerLenth = item.MarkerLenth; _cuttingItem.LineNo = item.LineNo; _cuttingItem.Color = item.Color; _cuttingItem.Size = item.Size; _cuttingItem.Length = item.Length; _cuttingItem.NoOfItem = item.NoOfItem; _cuttingItem.NoOfLayer = item.NoOfLayer; _cuttingItem.NoOfPlysLayed = item.NoOfPlysLayed; _cuttingItem.NoOfPlysPlaned = item.NoOfPlysPlaned; _cuttingItem.FabricType = item.FabricType; */ _cuttingItem = AssignCuttingItem(); _cuttingItem.CuttingItemID = this.CItem; _CuttingItemrRepo.Edit(_cuttingItem); } catch(Exception ex){ Debug.WriteLine(ex.Message); } }
private void EditSupplier() { try { GenaricRepository<SupplierMaster> _SupplierMasterRepoEdit = new GenaricRepository<SupplierMaster>(new ItrackContext()); _SupplierMasterRepoEdit.Edit (AssingSupplier()); } catch (Exception ex) { } }
bool EditFabricDetails() { try { GenaricRepository<FabricDetails> _FabricDetailsRepository = new GenaricRepository<FabricDetails>(new ItrackContext()); _FabricDetailsRepository.Edit(AssignfDetails()); return true; } catch (Exception ex) { Debug.WriteLine(ex.Message); return false; } }