public ActionResult UploadPurchase(string BillType, string InterState, HttpPostedFileBase FileUpload) { ExcelUploaders uploader = new ExcelUploaders(); bool IsVat = false; bool IsLocal = false; if (BillType == "VAT") { IsVat = true; } if (InterState == "WithInState") { IsLocal = true; } UploadReturns response = uploader.UploadExcel(UploadTypes.Purchase, FileUpload, Server.MapPath("~/Doc/"), IsVat, IsLocal); ViewBag.Status = response.ToString(); if (response == UploadReturns.Success) { return(RedirectToAction("ListUpload")); } return(View()); }
public ActionResult UploadSales(string BillType, string InterState, string UploadType, HttpPostedFileBase FileUpload) { ExcelUploaders uploader = new ExcelUploaders(); bool IsVat = false; bool IsLocal = true; if (BillType == "VAT") { IsVat = true; } if (InterState == "InterState") { IsLocal = false; } UploadTypes uType = UploadTypes.SaleItemWise; if (UploadType == "Register") { uType = UploadTypes.SaleRegister; } UploadReturns response = uploader.UploadExcel(uType, FileUpload, Server.MapPath("~/Doc/"), IsVat, IsLocal); ViewBag.Status = response.ToString(); if (response == UploadReturns.Success) { return(RedirectToAction("SaleList")); } return(View()); }
public IActionResult UploadSales(string BillType, string InterState, string UploadType, string StoreCode, IFormFile FileUpload) { ExcelUploaders uploader = new ExcelUploaders(); bool IsVat = false; bool IsLocal = true; if (BillType == "VAT") { IsVat = true; } if (InterState == "InterState") { IsLocal = false; } UploadTypes uType = UploadTypes.SaleItemWise; if (UploadType == "Register") { uType = UploadTypes.SaleRegister; } UploadReturns response = uploader.UploadExcel(db, uType, FileUpload, StoreCode, IsVat, IsLocal); ViewBag.Status = response.ToString(); if (response == UploadReturns.Success) { return(RedirectToAction("SaleList")); } return(View()); }
public IActionResult UploadPurchase(string BillType, string InterState, string StoreCode, IFormFile FileUpload) { // IFormFile FileUpload = null ; ExcelUploaders uploader = new ExcelUploaders(); bool IsVat = false; bool IsLocal = false; if (BillType == "VAT") { IsVat = true; } if (InterState == "WithInState") { IsLocal = true; } UploadReturns response = uploader.UploadExcel(db, UploadTypes.Purchase, FileUpload, StoreCode, IsVat, IsLocal); ViewBag.Status = response.ToString(); if (response == UploadReturns.Success) { return(RedirectToAction("ListUpload")); } return(View()); }