public ActionResult Notification(string str) { string date1 = Request.Form["tarih1"]; string date2 = Request.Form["tarih2"]; DateTime StartDate = Convert.ToDateTime(date1); DateTime EndDate = Convert.ToDateTime(date2); string DocumentNumber = ""; string NotificationType = ""; JsonTypeResult result = Service.getTransactionList("00000000080", "9F727065-0758-4152-8B93-06AFA694C7A5", DocumentNumber, StartDate, EndDate, NotificationType); if (result.Result) { TempData["ileti"] = "Başarılı"; return(View(result.Data)); } else { TempData["ileti"] = "Başarısız"; List <NotificationHistory> notification = new List <NotificationHistory>(); return(View(notification.ToList())); } }
public ActionResult DetailsConfirmed(UrunlerVM urunVM) { string value = urunVM.BildirimValue; int id = urunVM.Id; string vvv = urunVM.Seri_No; ürünler urunDB = db.ürünler.Find(id); UrunlerVM urunVM2 = new UrunlerVM(); urunVM2.Id = urunDB.Id; urunVM2.Seri_No = urunDB.Seri_No; urunVM2.Parti_No = urunDB.Parti_No; urunVM2.GTIN_No = urunDB.GTIN_No; urunVM2.Üretim_Tarihi = urunDB.Üretim_Tarihi; urunVM2.Son_Kullanma_Tarihi = urunDB.Son_Kullanma_Tarihi; urunVM2.Karekod_Bilgisi = urunDB.Karekod_Bilgisi; urunVM2.Palet_No = urunDB.Palet_No; urunVM2.Koli_No = urunDB.Koli_No; urunVM2.İş_Emri_No = urunDB.İş_Emri_No; DocumentHeader head = new DocumentHeader(); head.sender = "00000000080"; //satış için degişti head.receiver = ""; head.key = "9F727065-0758-4152-8B93-06AFA694C7A5"; //degişti head.actionType = "M"; //döküman numarası ürün idsine göre gönderiliyor. head.documentNumber = "1111"; //head.documentDate = "2018-08-18"; head.documentDate = DateTime.Now.ToString("yyyy/MM/dd"); //seçilen bildirime göre degişti head.note = "Üretim Bildirimi"; //deaktivasyon note degiştirildi head.deactivationNote = ""; head.exportReceiverNote = ""; head.exportCountry = null; head.importSenderNote = ""; head.importCountry = null; //iade kodu degiştirildi head.returnNote = ""; head.destructionNote = ""; head.idTaxNo = ""; if (value.Equals("DEAKTIVASYON")) { //action deaktivasyon D head.actionType = "D"; head.note = "DEAKTIVASYON Bildirimi"; head.deactivationNote = urunVM.DeaktivasyonValue; } else if (value.Equals("SATIS")) { //action Satış S head.actionType = "S"; head.receiver = urunVM.aliciGlnNo; head.note = "SATIS Bildirimi"; } else if (value.Equals("SATISIPTAL")) { //action Satış iptal C head.actionType = "C"; head.note = "SATISIPTAL Bildirimi"; } else if (value.Equals("IADE")) { //action İade R head.actionType = "R"; head.note = "IADE Bildirimi"; head.returnNote = urunVM.IadeValue; } string Headaer = Operations.GetJson(head); List <DocumentDetail> Deat = new List <DocumentDetail>(); DocumentDetail detail1 = new DocumentDetail(); detail1.serialNumber = urunVM2.Seri_No; detail1.lotNumber = urunVM2.Parti_No; detail1.gtinNumber = urunVM2.GTIN_No; detail1.parentCarrierNo = urunVM2.Palet_No; detail1.carrierNo = urunVM2.Koli_No; detail1.productNote = "ürün açıklaması"; detail1.productionDate = Convert.ToDateTime(urunVM2.Üretim_Tarihi); detail1.expirationDate = Convert.ToDateTime(urunVM2.Son_Kullanma_Tarihi); detail1.qrCode = urunVM2.Karekod_Bilgisi; Deat.Add(detail1); string Detail = Operations.GetJson(Deat); JsonTypeResult result = Service.sendNotificationAndDetail("00000000080", "9F727065-0758-4152-8B93-06AFA694C7A5 ", Headaer, Detail); return(RedirectToAction("Index")); }