Ejemplo n.º 1
0
        public ActionResult DownloadContract(int id = -1, int it = -1, string norm = null, string weight = null, string mode = null, string freight = null, string client = null, string place = null, string date = null, string data = null, List <string[]> lt = null)
        {
            PdfService pdfService = new PdfService();
            //var entity = _supplierService.GetItemQuote(it);
            var model  = _supplierService.Get(it);
            var item   = _itemService.Get(id);
            var entity = _purchaserService.Get(Convert.ToInt32(client));
            IEnumerable <Contract> list = _itemService.GetContract(id, it);
            string name = null;

            if (item.TempMode == 2)
            {
                name = pdfService.ContractToPDF2(model, item, list, norm, weight, mode, freight, entity, place, date, data, lt);
            }
            else
            {
                name = pdfService.ContractToPDF1(model, item, list, norm, weight, mode, freight, entity, place, date, data, lt);
            }
            return(Json(new { code = 200, message = "保存成功!", name = name }));
        }