示例#1
0
        CPrintRightData getPrintRightData()
        {
            CPrintRightData re = new CPrintRightData();

            try
            {
                re.hu        = mCurBoxNo;
                re.storeType = mCurJieHuoDan.mJieHuo[0].STOTYPE;
                re.jihuodate = mCurJieHuoDan.mJieHuo[0].PICK_DATE;
                re.demawave  = mCurJieHuoDan.mJieHuo[0].WAVEID;
                re.daolukou  = mCurJieHuoDan.mJieHuo[0].EXPORT_NO;
                re.num       = mCurJieHuoDan.mJieHuo.Sum(i => i.QTY).ToString();
            }
            catch (Exception e)
            {
                Log4netHelper.LogError(e);
            }

            return(re);
        }
示例#2
0
        public static void PrintRightTag(CPrintRightData rd)
        {
            try
            {
                string    filepath  = Application.StartupPath + "\\Print\\RightLabel.mrt";
                StiReport stiReport = new StiReport();
                stiReport.Load(filepath);
                stiReport.Compile();

                stiReport["HU"]        = rd.hu;
                stiReport["STORETYPE"] = rd.storeType;
                stiReport["JIHUODATE"] = rd.jihuodate;
                stiReport["DEMAWAVE"]  = rd.demawave;
                stiReport["DAOLUKOU"]  = rd.daolukou;
                stiReport["SHULIANG"]  = rd.num;

                PrinterSettings printerSettings = new PrinterSettings();
                stiReport.Print(false, printerSettings);
            }
            catch (Exception e)
            {
                Log4netHelper.LogError(e);
            }
        }