void addDayendHeader() { try { GenaricRepository<DayendHeader> _DayendHeaderRepository = new GenaricRepository<DayendHeader>(new ItrackContext()); _DayendHeaderRepository.Add(AssignHeader()); } catch(Exception ex){ Debug.WriteLine(ex.Message); } }
void AddTimeScadual() { try { GenaricRepository<ScaningTimeSchadual> _ScaningRepository = new GenaricRepository<ScaningTimeSchadual>(new ItrackContext()); _ScaningRepository.Add(AssignValues()); } catch(Exception ex){ Debug.WriteLine(ex.Message); } }
private void AddField() { try { GenaricRepository<GRN> _GRNRepo = new GenaricRepository<GRN>(new ItrackContext()); _GRNRepo.Add(AssingGRN()); } catch (Exception ex) { } }
void saveOparation() { try { GenaricRepository<DividingPlanHeader> _dHeaderRepo = new GenaricRepository<DividingPlanHeader>(new ItrackContext()); DividingPlanHeader dHeader = new DividingPlanHeader(); dHeader.LineNo = txtLineNo.Text; dHeader.ProductionPerHour =Convert.ToInt16( txtProductionPerHour.Text); dHeader.StyleID = txtStyleNo.Text; dHeader.TotalEmployee =Convert.ToInt16( txtTotalEmployee.Text); dHeader.Target =Convert.ToInt16(txtTarget.Text); _dHeaderRepo.Add(dHeader); dHeader.DividingPlanheaderID = _dHeaderRepo.GetAll().ToList().Last().DividingPlanheaderID; for (int i = 0; i < gridView3.RowCount; i++) { GenaricRepository<DividingPlanItem> _dItemRepo = new GenaricRepository<DividingPlanItem>(new ItrackContext()); DividingPlanItem dItem = new DividingPlanItem(); dItem.OprationNo = gridView3.GetRowCellValue(i, "OprationNo").ToString(); dItem.OprationName = gridView3.GetRowCellValue(i, "OprationName").ToString(); dItem.SMVType = gridView3.GetRowCellValue(i, "SMVType").ToString(); dItem.MachineType = gridView3.GetRowCellValue(i, "MachineType").ToString(); dItem.SMV =Convert.ToDouble( gridView3.GetRowCellValue(i, "SMV").ToString()); dItem.DividingPlanHeaderID = dHeader.DividingPlanheaderID; dItem.PartName = gridView3.GetRowCellValue(i, "PartName").ToString(); string status = gridView3.GetRowCellValue(i, "Selected").ToString(); GenaricRepository<DividingPlanTemp> _dItemTempRepo = new GenaricRepository<DividingPlanTemp>(new ItrackContext()); DividingPlanTemp dTemp = new DividingPlanTemp(); dTemp.DividingPlanTempID = Convert.ToInt16(gridView3.GetRowCellValue(i, "DividingPlanTempID").ToString()); if (status == "True") { _dItemRepo.Insert(dItem); _dItemTempRepo.Delete(dTemp); } else { } } } catch(Exception ex){ Debug.WriteLine(ex.Message); } }
private void AddPOItems() { try { GenaricRepository<PurchaseOrderItems> _PoRepository = new GenaricRepository<PurchaseOrderItems>(new ItrackContext()); _PoRepository.Add(AssignPoItems()); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error - B-0002", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public bool FeedLedger(StockLedger _ledger) { try { GenaricRepository<StockLedger> _GRNRepo = new GenaricRepository<StockLedger>(new ItrackContext()); _GRNRepo.Add(_ledger); return true; } catch (Exception ex) { return false; } }
private void AddCuttingHeader() { try { GenaricRepository<CuttingHeader> _HeaderRepository = new GenaricRepository<CuttingHeader>(new ItrackContext()); _HeaderRepository.Add(AssignHeader()); } catch (Exception ex) { Debug.WriteLine(ex.Message); MessageBox.Show(ex.Message, "Error - B-0003", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
/// <summary> /// Add PO Calling This Method /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AddField() { try { GenaricRepository<PO> _PORepo = new GenaricRepository<PO>(new ItrackContext()); _PORepo.Add(AssingPO()); } catch (Exception ex) { } }
private void addGrnItems() { try { GenaricRepository<GrnItems> _GrnItemsRepo = new GenaricRepository<GrnItems>(new ItrackContext()); GrnItems _grnitems = new GrnItems(); foreach (var item in lstGrnItems) { _grnitems.ItemCode = item.ItemCode; _grnitems.Description = item.Description; _grnitems.Color = item.Color; _grnitems.Width = item.Width; _grnitems.Unit = item.Unit; _grnitems.Qty = item.Qty; _grnitems.ReceivedQty = item.ReceivedQty; _grnitems.UnitPrice = item.UnitPrice; _grnitems.ReceivedPrice = item.ReceivedPrice; _grnitems.LineDiscount = item.LineDiscount; _grnitems.waistadeQty = item.waistadeQty; _grnitems.SubTotal = item.SubTotal; _grnitems.GRNID = txtGrnNo.Text; _GrnItemsRepo.Add(_grnitems); feedLedger(_grnitems); } } catch(Exception ex){ Debug.WriteLine(ex.Message); } }
private void AddField() { try { GenaricRepository<VehicleRequisition> _VehicleRequestionRepo = new GenaricRepository<VehicleRequisition>(new ItrackContext()); _VehicleRequestionRepo.Add(AssingVehicleRequisition()); } catch (Exception ex) { } }
private void EditLayerDetails() { try { GenaricRepository<LayinDetails> _LayinDetailsRepo = new GenaricRepository<LayinDetails>(new ItrackContext()); _LayinDetailsRepo.Add(AssignFabricDetails()); } catch (Exception ex) { Debug.WriteLine(ex.Message); } }
private void AddBundleHeader() { try { GenaricRepository<BundleHeader> _BundleHeaderRepository = new GenaricRepository<BundleHeader>(new ItrackContext()); _BundleHeaderRepository.Add(AssignBundleHeader()); } catch(Exception ex){ Debug.WriteLine(ex.Message); } }
bool AddFabricDetails() { try { GenaricRepository<FabricDetails> _FabricDetailsRepository = new GenaricRepository<FabricDetails>(new ItrackContext()); _FabricDetailsRepository.Add(AssignfDetails()); return true; } catch(Exception ex){ Debug.WriteLine(ex.Message); return false; } }
private void addPoItems() { try { GenaricRepository<PoItems> _POitemRepo = new GenaricRepository<PoItems>(new ItrackContext()); PoItems _poitem = new PoItems(); foreach (var item in lstPoItems) { _poitem.ItemCode = item.ItemCode; _poitem.Price = item.Price; _poitem.Qty = item.Qty; _poitem.SubTotal = item.SubTotal; _poitem.POID = txtPoNo.Text; _poitem.Discount = 0; _poitem.ItemsID = item.ItemCode; _poitem.Description = item.Description; _poitem.Colors = item.Colors; _poitem.Width = item.Width; _poitem.Unit = item.Unit; _POitemRepo.Add(_poitem); } } catch(Exception ex){ Debug.WriteLine(ex.Message); } }
private void AddOpration() { try { GenaricRepository<OperationPool> _OperationRepository = new GenaricRepository<OperationPool>(new ItrackContext()); _OperationRepository.Add(AssignOperation()); } catch (Exception ex) { Debug.WriteLine(ex.Message); MessageBox.Show(ex.Message, "Error - B-0003", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public static void AddCuttingSummary(DateTime dayendDate) { try { GenaricRepository<CuttingItem> _CUttingItemRepo = new GenaricRepository<CuttingItem>(new ItrackContext()); GenaricRepository<CuttingSummary> _CUttingSummaryRepo = new GenaricRepository<CuttingSummary>(new ItrackContext()); CuttingSummary _cSummary = new CuttingSummary(); var CuttingItemList = from items in _CUttingItemRepo.GetAll().ToList() where items.Date.Day == dayendDate.Day && items.Date.Month == dayendDate.Month && items.Date.Year == dayendDate.Year select items; foreach( var item in CuttingItemList){ _cSummary.MarkerNo = item.MarkerNo; _cSummary.CuttingIdDetails = item.CuttingItemID; _cSummary.FabricType = item.FabricType; _cSummary.Color = item.Color; _cSummary.Size = item.Size; _cSummary.NoPcs = item.NoOfItem; _cSummary.DayendHeaderID = Convert.ToString(dayendDate.Year + dayendDate.Month + dayendDate.Day); _CUttingSummaryRepo.Add(_cSummary); Debug.WriteLine("Date :" + item.Date + " Cut No :" + item.CuttingItemID + " Fabric Type :"+ item.FabricType + " Color :" + item.Color + " Size :" + item.Size + "PCS :" + item.NoOfItem); } } catch(Exception ex) { Debug.WriteLine(ex.Message); } }
/// <summary> /// /day end process run . admin can run privoues day /// </summary> /// <param name="dayendDate"></param> public static async Task<bool> GetProductionDaySummary(DateTime dayendDate) { try { GenaricRepository<OprationBarcodes> _OperationBarcode = new GenaricRepository<OprationBarcodes>(new ItrackContext()); var itemList = from items in _OperationBarcode.GetAll().ToList() where items.OprationRole == "In" && items.isOparationComplete == true && items.OprationComplteAt.Day == dayendDate.Day && items.OprationComplteAt.Month == dayendDate.Month && items.OprationComplteAt.Year == dayendDate.Year group items by new { items.OprationComplteAt.Date, items.LineNo, items.StyleNo, items.BundleDetails.BundleHeader.CuttingItem.Color, items.BundleDetails.BundleHeader.CuttingItem.Size } into ItemG select new { ItemG.Key.Date, ItemG.Key.LineNo, ItemG.Key.StyleNo, ItemG.Key.Color, ItemG.Key.Size, Count = ItemG.Sum(c => c.BundleDetails.NoOfItem) }; var itemListOut = from items in _OperationBarcode.GetAll().ToList() where items.OprationRole == "Out" && items.isOparationComplete == true && items.OprationComplteAt.Day == dayendDate.Day && items.OprationComplteAt.Month == dayendDate.Month && items.OprationComplteAt.Year == dayendDate.Year group items by new { items.OprationComplteAt.Date, items.LineNo, items.StyleNo, items.BundleDetails.BundleHeader.CuttingItem.Color, items.BundleDetails.BundleHeader.CuttingItem.Size } into ItemG select new { ItemG.Key.Date, ItemG.Key.LineNo, ItemG.Key.StyleNo, ItemG.Key.Color, ItemG.Key.Size, Count = ItemG.Sum(c => c.BundleDetails.NoOfItem) }; foreach (var items in itemList) { Debug.WriteLine("Date :" + items.Date.Date + " Line No - " + items.LineNo + " Style No " + items.StyleNo + " Color -" + items.Color + " Size -" + items.Size +" Cut Qty -"+ GetCutOut(dayendDate, items.LineNo, items.Color, items.Size, items.StyleNo) + " In - " + items.Count + " Out -" + GetOutPut(dayendDate, items.LineNo, items.Color, items.Size, items.StyleNo)); GenaricRepository<Dayend> _DayendRepository = new GenaricRepository<Dayend>(new ItrackContext()); Dayend _dayend = new Dayend(); _dayend.DayendHeaderID = Convert.ToString(dayendDate.Year + dayendDate.Month + dayendDate.Day); _dayend.DayendID = Convert.ToString(dayendDate.Year + dayendDate.Month + dayendDate.Day); _dayend.Date = items.Date; _dayend.LineNo = items.LineNo; _dayend.StyleNo = items.StyleNo; _dayend.Color = items.Color; _dayend.Length = "None"; _dayend.Size = items.Size; _dayend.LineIn = Convert.ToInt16(items.Count); // _dayend.LineOut = GetOutPut(dayendDate, items.LineNo, items.Color, items.Size, items.StyleNo); var co = from c in itemListOut where c.Color == _dayend.Color && c.Size == _dayend.Size && c.LineNo == _dayend.LineNo select c; double i = co.Last().Count; _dayend.LineOut =Convert.ToInt16(i); _dayend.CutQty = GetCutOut(dayendDate, items.LineNo, items.Color, items.Size, items.StyleNo); _DayendRepository.Add(_dayend); } return true; } catch (Exception ex) { Debug.WriteLine(ex.Message); return false; } }
private void AddEmployee() { try { GenaricRepository<Employee> _EmployeeRepo = new GenaricRepository<Employee>(new ItrackContext()); _EmployeeRepo.Add(AssignEmployee()); } catch (Exception ex) { Debug.WriteLine(ex.Message); MessageBox.Show(ex.Message, "Error - B-0003", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void AddCuttingItem() { try { GenaricRepository<CuttingItem> _CuttingItemRepo = new GenaricRepository<CuttingItem>(new ItrackContext()); if (isEligbleCuttingItem(AssignCuttingItem()) == true) { _CuttingItemRepo.Add(AssignCuttingItem()); } else { MessageBox.Show("Already Exist", "Error - B-0003", MessageBoxButtons.OK, MessageBoxIcon.Error); } } catch (Exception ex) { Debug.WriteLine(ex.Message); MessageBox.Show(ex.Message, "Error - B-0003", MessageBoxButtons.OK, MessageBoxIcon.Error); } }