private Model.PartItem MakePrint(Model.PsSheet ps) { int num = 0; if (ps.PrintNum > 0) { num = ps.PsNum * ProductNum / (ps.PrintNum); } else { num = ps.PsNum * ProductNum; } int colornum = ColorNum; Model.PartItem pips = new Model.PartItem(); pips.PartType = 4; string psname = ""; int pid = 4; decimal psprice = 0; if (colornum == 1) { psname = "黑白印工"; pid = 34; } if (colornum == 2) { psname = "黑白印工"; pid = 34; num = num * 2; } if (colornum == 4) { psname = "彩色印工"; } psprice = Model.C_ProcessPrice.GetProcessPrice(pid, num); Model.C_ProcessPrice cp = Model.C_ProcessPrice.GetById(pid); pips.Price = cp.SinglePrice1; pips.PartName = psname; pips.Name = psname; pips.Id = pid; pips.Num = num; pips.Money = psprice; pips.Remark = ps.PrintNum.ToString() + "拼"; return(pips); }
public bool AddProcess(int processid, int num) { Model.PartItem pi = new Model.PartItem(); pi.PartType = 8; pi.PartName = "后道工艺"; pi.Id = processid; Model.Process pro = Model.Process.GetDataById(processid); int extend = (int)(Part.PaperNum * 10 * pro.ExtendRatio); Part.PaperExtend += extend; AllExtendPaper += extend; pi.Name = pro.ProcessName; pi.Num = num; pi.Money = Model.C_ProcessPrice.GetProcessPrice(processid, num); Model.C_ProcessPrice cp = Model.C_ProcessPrice.GetById(processid); pi.Price = cp.SinglePrice1; pi.Remark = "放张数:" + extend.ToString(); AllItem.Add(pi); return(true); }