Example #1
0
        private bool GetPsSheet(int l, int h)
        {
            bool sucess = false;

            Model.P_Sheet ps = DAL.P_Sheet.GetModelByLH(l, h);
            if (ps != null)
            {
                sucess = true;
                Model.Size st = DAL.Size.GetModel(ps.SizeId);//得到目标尺寸的数据,存入目标尺寸表
                if (st != null)
                {
                    NewSize.Id     = st.Id;
                    NewSize.Height = st.Height;
                    NewSize.Length = st.Length;
                    NewSize.Kaidu  = st.KaiShu;
                    NewSize.Name   = st.SizeName;
                    OldSize.Kaidu  = ps.ProductKaidu;
                    if (NewSize.Name.IndexOf("大") > 0)
                    {
                        OldSize.Name = "大度" + ps.ProductKaidu.ToString();
                    }
                    else
                    {
                        OldSize.Name = "正度" + ps.ProductKaidu.ToString();
                    }
                }
                else
                {
                    NewSize.Height = ps.MaxHeight;
                    NewSize.Length = ps.MaxLength;
                    NewSize.Kaidu  = ps.PaperKaiShu;
                    NewSize.Name   = "自适应" + ps.PaperKaiShu.ToString();
                    OldSize.Kaidu  = ps.ProductKaidu;
                    OldSize.Name   = "自适应" + ps.ProductKaidu.ToString();
                }
            }
            return(sucess);
        }
Example #2
0
        /// <summary>
        /// 根据OldSize的尺寸ID,去得到一个标准的开纸方法;
        /// </summary>
        /// <returns></returns>
        private bool GetPsSheet()
        {
            bool sucess = false;

            if (OldSize.Id > 0)
            {
                Model.P_Sheet ps = DAL.P_Sheet.GetModelBySize(OldSize.Id);
                if (ps != null)
                {
                    Model.Size st = DAL.Size.GetModel(ps.SizeId);//得到目标尺寸的数据,存入目标尺寸表
                    if (st != null)
                    {
                        NewSize.Id     = st.Id;
                        NewSize.Height = st.Height;
                        NewSize.Length = st.Length;
                        NewSize.Kaidu  = st.KaiShu;
                        NewSize.Name   = st.SizeName;
                        sucess         = true;
                        TransTag       = 0;
                    }
                }
            }
            return(sucess);
        }