예제 #1
0
        public FoldPaper(Model.recttange size, int ProNum, int color, int lfold, int hfold, int TypeNum)
            : base(size, ProNum, color)
        {
            ProductName = "折页";
            ProductId   = 4;
            int i = 0;

            if (lfold > 1)
            {
                ResetCoverLpage(lfold);
                i = lfold - 1;
            }
            if (hfold > 1)
            {
                ResetCoverHpage(hfold);
                i = i + hfold - 1;
            }

            if (i > 0)
            {
                InsertSingleProcess(7, ProNum * i);
            }
            Cover.UnitName = "折页";
            if (TypeNum > 1)
            {
                Cover.PageNum = Cover.PageNum * TypeNum;
                Cover.ReCaculation();

                ProductName = TypeNum.ToString() + "种 折页";
            }

            //Cover.ReCaculation();
        }
예제 #2
0
 public FoldPaper(Model.recttange size, int ProNum, int color)
     : base(size, ProNum, color)
 {
     ProductName    = "折页";
     ProductId      = 4;
     Cover.UnitName = "折页";
 }
예제 #3
0
        /// <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!";
        }
예제 #4
0
        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);
        }
예제 #5
0
 public Envelope(Model.recttange psize, int ProNum, int color)
     : base(psize, ProNum, color)
 {
     InsertSingleProcess(28, ProNum);
     ProductName = "信封";
     ProductId   = 5;
 }
예제 #6
0
파일: caculation.cs 프로젝트: xiaofengtan/-
        /// <summary>
        /// 计算成品重量,根据纸尺寸,克重,计算出公斤数
        /// </summary>
        /// <param name="size"></param>
        /// <param name="kg"></param>
        /// <param name="Page"></param>
        /// <param name="productNum"></param>
        /// <returns></returns>
        public static int CalWeight(Model.recttange size, int kg, int Page, int productNum)
        {
            int    result = 0;
            double r      = (double)size.length * size.height * kg * Page * productNum / (double)(2 * 1000 * 1000 * 1000);

            result = Convert.ToInt32(r);
            return(result);
        }
예제 #7
0
 /// <summary>
 /// 封套的初始化程序
 /// </summary>
 /// <param name="psize"></param>
 /// <param name="ProNum"></param>
 /// <param name="color"></param>
 /// <param name="AddHeight">封套增加部分的长度</param>
 public PaperLitteBag(Model.recttange psize, int ProNum, int color, int AddHeight)
     : base(psize, ProNum, color)
 {
     ProductName = "封套";
     ProductId   = 10;
     InsertSingleProcess(26, ProNum);
     InsertSingleProcess(27, ProNum);
     Cover.UnitName = "封套";
 }
예제 #8
0
 public PaperBag(Model.recttange psize, int ProNum, int color)
     : base(psize, ProNum, color)
 {
     ProductName = "纸袋";
     ProductId   = 6;
     InsertSingleProcess(26, ProNum);
     InsertSingleProcess(27, ProNum);
     Cover.UnitName = "纸袋";
 }
예제 #9
0
파일: book.cs 프로젝트: xiaofengtan/-
 /// <summary>
 /// 初始化一个封面没有折页,拉页等特殊工艺的画册;
 /// </summary>
 /// <param name="size">封面尺寸ID</param>
 /// <param name="PaperId">纸张ID</param>
 /// <param name="ProNum">产品数量</param>
 /// <param name="bindtype">装订方式</param>
 /// <param name="color">封面颜色</param>
 public book(Model.recttange psize, int ProNum, int color)
     : base(psize, ProNum, color)
 {
     if (psize.QuNum % 2 > 0)
     {
         psize.QuNum = (psize.QuNum / 2 + 1) * 2;
     }
     ProductName    = "画册";
     ProductId      = 1;
     Cover.UnitName = "画册封面";
 }
예제 #10
0
 /// <summary>
 /// 把MODEL下的矩形转化自己的类
 /// </summary>
 /// <param name="rect"></param>
 /// <returns></returns>
 public Model.recttange GetModleByRect(rectang rect)
 {
     Model.recttange r = new Model.recttange();
     r.Id     = rect.Id;
     r.height = rect.Height;
     r.length = rect.Length;
     r.MId    = rect.MId;
     r.Name   = rect.Name;
     r.QuNum  = rect.Num;
     return(r);
 }
예제 #11
0
        /// <summary>
        /// 把MODEL.RECTTANGE 转换成RECTANG;
        /// </summary>
        /// <param name="r"></param>
        /// <returns></returns>
        public static rectang GetRectByModle(Model.recttange r)
        {
            rectang rect = new rectang();

            rect.Id     = r.Id;
            rect.Height = r.height;
            rect.Length = r.length;
            rect.MId    = r.MId;
            rect.Name   = r.Name;
            rect.Num    = r.QuNum;
            return(rect);
        }
예제 #12
0
파일: caculation.cs 프로젝트: xiaofengtan/-
        /// <summary>
        /// 增加用户选择工艺
        /// mr结构为id为processid,length ,heigth;
        /// 同时增加某工艺的隐含工艺。
        /// </summary>
        /// <param name="mr"></param>
        private static Model.recttange AddNexeProcess(Model.recttange mr)
        {
            Model.recttange r1   = null;
            Model.Process   p1   = DAL.Process.GetModel(mr.Id);
            int             next = p1.MustNext;

            if (next > 0)
            {
                r1        = new Model.recttange();
                r1.length = mr.length;
                r1.height = mr.height;
                r1.QuNum  = mr.QuNum;
                r1.Id     = next;
            }
            return(r1);
        }
예제 #13
0
        public SinglePaper(Model.recttange psize, int ProNum, int color, int TypeNum)
            : base(psize, ProNum, color)
        {
            ProductName    = "单页";
            ProductId      = 3;
            Cover.UnitName = "单页";
            TNum           = TypeNum;
            if (TypeNum > 1)
            {
                bool IsSingle = Cover.PageNum == 1;
                //if (IsSingle)
                //    Cover.PageNum = 2;
                Cover.PageNum = Cover.PageNum * TNum;
                Cover.ReCaculation();
                if (IsSingle)
                {
                    Cover.PaperNum = Cover.PaperNum * 2;
                }

                ProductName = TypeNum.ToString() + "种 单页";
            }
        }
예제 #14
0
파일: GetRequest.cs 프로젝트: xiaofengtan/-
 /// <summary>
 /// 添加工艺,判断是否有相同type的工艺
 /// </summary>
 /// <param name="processid">工艺id</param>
 /// <param name="rectlist">工艺类列表</param>
 /// <param name="l">长</param>
 /// <param name="h">高</param>
 /// <param name="q">数量</param>
 /// <returns></returns>
 public List <Model.recttange> GetProcessList(int processid, List <Model.recttange> rectlist, int l, int h, int q)
 {
     Model.Process pro1 = DAL.Process.GetModel(processid);
     for (int i = 0; i < rectlist.Count; i++)
     {
         Model.Process pro = DAL.Process.GetModel(rectlist[i].Id);
         if (pro1.TypeId == pro.TypeId)
         {
             rectlist[i].Id   = processid;
             rectlist[i].Name = pro1.ProcessName;
             if (l > 0 && h > 0)
             {
                 rectlist[i].length = l;
                 rectlist[i].height = h;
             }
             if (q > 0)
             {
                 rectlist[i].QuNum = q;
             }
         }
         else//没有同类型的工艺
         {
             Model.recttange rect = new Model.recttange();
             rect.Id   = processid;
             rect.Name = pro1.ProcessName;
             if (l > 0 && h > 0)
             {
                 rect.length = l;
                 rect.height = h;
             }
             if (q > 0)
             {
                 rect.QuNum = q;
             }
             rectlist.Add(rect);
         }
     }//循环结束
     return(rectlist);
 }