public string UpdateAndSaveBarcodeDisplaySettingsHeader(int Iserial, int barcodeOperation, string PrintingBarcodeFormate, double BarcodeWidth, double BarcodeHeight, string code, double PageWidth, double PageHeight, string PageSizeUnit) { using (var context = new WorkFlowManagerDBEntities()) { var displayHeaderRow = new BarcodeDisplaySettingsHeader(); if (Iserial != 0) { displayHeaderRow = (from h in context.BarcodeDisplaySettingsHeaders where h.Iserial == Iserial select h).SingleOrDefault(); } displayHeaderRow.BarcodeOperation = barcodeOperation; displayHeaderRow.PrintingBarcodeFormate = PrintingBarcodeFormate; displayHeaderRow.BarcodeWidth = BarcodeWidth; displayHeaderRow.BarcodeHeight = BarcodeHeight; displayHeaderRow.Code = code; displayHeaderRow.PageHeight = PageHeight; displayHeaderRow.PageWidth = PageWidth; displayHeaderRow.PageSizeUnit = PageSizeUnit; if (Iserial == 0) { context.BarcodeDisplaySettingsHeaders.AddObject(displayHeaderRow); } context.SaveChanges(); return(code); } }
private BarCodeSettingsList MapToBarcode(BarcodeDisplaySettingsHeader barCode) { return(new BarCodeSettingsList { PrintingCode = barCode.Code, Iserial = barCode.Iserial, }); }
private BarcodeSettingsHeader MapTOBarcodeSettingsHeader(BarcodeDisplaySettingsHeader _Object) { return(new BarcodeSettingsHeader { Iserial = _Object.Iserial, BarcodeHeight = _Object.BarcodeHeight, BarcodeWidth = _Object.BarcodeWidth, Code = _Object.Code, PrintingBarcodeFormate = _Object.PrintingBarcodeFormate, BarcodeOperation = _Object.BarcodeOperation, PageHeight = _Object.PageHeight, PageWidth = _Object.PageWidth, PageSizeUnit = _Object.PageSizeUnit, PageWidthSizeUnitProperty = _Object.PageWidth + " " + _Object.PageSizeUnit, PageHeightSizeUnitProperty = _Object.PageHeight + " " + _Object.PageSizeUnit, }); }