public static Model.recttange GetPaperRect(Model.recttange size) { rectang old = GetRectByModle(size); rectang newsize = new rectang(); Model.recttange result = new Model.recttange(); FoldSheet fd; if (old.Id > 0) { fd = new FoldSheet(old.Id); } else { fd = new FoldSheet(old.Length, old.Height); } if (fd != null) { result.Id = fd.NewSize.Id; result.length = fd.NewSize.Length; result.height = fd.NewSize.Height; result.Name = fd.NewSize.Name; result.QuNum = fd.NewSize.Kaidu; return(result); } return(null); }
/// <summary> /// /// </summary> /// <param name="psize">size.id 尺寸ID,size.Length长, size.Height高, size.MId纸的ID,size.Num页码数, /// psize.Status纸张来源,psize.b1 内容是否重复</param> /// <param name="ProNum">产品数量</param> /// <param name="color">颜色数</param> public papersheet(Model.recttange psize, int ProNum, int color) { rectang size = new rectang(); size = Common.GetRectByModle(psize); ProductSize = new rectang(); if (size.Id > 0) { ProductSize.Id = size.Id; Model.ProductSize p = DAL.ProductSize.GetModel(size.Id); ProductSize.Length = p.StandLength; ProductSize.Height = p.StandHeight; ProductSize.Kaidu = p.Kaidu; ProductSize.Name = p.NickName; } else { ProductSize.Length = psize.length; ProductSize.Height = psize.height; FoldSheet fd = new FoldSheet(ProductSize.Length, ProductSize.Height); if (fd.OldSize != null) { ProductSize.Kaidu = fd.OldSize.Kaidu; ProductSize.Name = fd.OldSize.Name; } } ProductNum = ProNum; Cover = new ProductUnit(size.Id, size.Length, size.Height, size.MId, color, size.Num, psize.Status, psize.b1, ProNum); Cover.GroupId = 0; Cover.UnitName = ProductName; //UserRequest = "test!"; }
private void GetSize() { FoldSheet fd; if (Size.Id > 0) { fd = new FoldSheet(Size.Id); } else { fd = new FoldSheet(Size.Length, Size.Height); } Size = fd.OldSize; PrintPaper = new rectang(); PrintPaper = fd.NewSize; ProductKaidu = Size.Kaidu; PsKaidu = PrintPaper.Kaidu; }
public static rectang GetPaperRect(rectang old) { rectang newsize = new rectang(); FoldSheet fd; if (old.Id > 0) { fd = new FoldSheet(old.Id); } else { fd = new FoldSheet(old.Length, old.Height); } if (fd != null) { return(fd.NewSize); } return(null); }