public ActionResult davakayit(string test, string tip, string tc, string davaad) { DavakayitViewModel dkn = new DavakayitViewModel(); dkn.avukats = db.avukats.ToList(); string yol = tip; //kurumsal bireysel için dosya yolu try { string subyol = "/uploads/" + yol + "/" + tc; //müşteri klasör işlemi foreach (string file in Request.Files) { HttpPostedFileBase http = Request.Files[file]; //dosya ekleme işlemi string tamyol = "/uploads/" + yol + "/" + tc + "/aktifdavalar/" + davaad + "/" + http.FileName; Request.Files[file].SaveAs(Server.MapPath(tamyol)); } ViewBag.alertler = "success"; } catch (Exception) { ViewBag.alertler = "error"; throw; } return(View(dkn)); }
public ActionResult davakayit() { DavakayitViewModel dkn = new DavakayitViewModel(); dkn.avukats = db.avukats.ToList(); return(View(dkn)); }
public ActionResult kurumsaldavalar() { DavakayitViewModel dtb = new DavakayitViewModel(); dtb.bitenDavalars = db.bitendavalars.ToList(); dtb.avukats = db.avukats.ToList(); dtb.davalars = db.davalars.ToList(); return(View(dtb)); }
public ActionResult Davasil() { OurDbContext db = new OurDbContext(); DavakayitViewModel dkb = new DavakayitViewModel(); dkb.bitenDavalars = db.bitendavalars.ToList(); dkb.davalars = db.davalars.ToList(); dkb.avukats = db.avukats.ToList(); return(View(dkb)); }
public ActionResult kurumsaldavalar(string davaId, string durum) { try { OurDbContext db = new OurDbContext(); DavakayitViewModel dkb = new DavakayitViewModel(); dkb.bitenDavalars = db.bitendavalars.ToList(); dkb.davalars = db.davalars.ToList(); dkb.avukats = db.avukats.ToList(); Object mst; if (durum == "aktif") { mst = db.davalars.Where(x => x.DavaId.ToString() == davaId).FirstOrDefault(); } else { mst = db.bitendavalars.Where(x => x.DavaId.ToString() == davaId).FirstOrDefault(); } string yol = "kurumsal"; Davalar test = null; BitenDavalar testb = null; try { test = (Davalar)mst; } catch (Exception) { testb = (BitenDavalar)mst; } string subyol = "/uploads/" + yol + "/"; if (test != null) { subyol += test.Musteriler.musteriTc + "/aktifdavalar/" + test.DavaAdi; } else if (testb != null) { if (testb.Musteriler != null) { subyol += testb.Musteriler.musteriTc + "/bitendavalar/" + testb.DavaAdi; } else { subyol += testb.BMusteriler.musteriTc + "/bitendavalar/" + testb.DavaAdi; } } try { foreach (string file in Request.Files) { HttpPostedFileBase http = Request.Files[file]; //dosya ekleme işlemi string tamyol = subyol + "/" + http.FileName; Request.Files[file].SaveAs(Server.MapPath(tamyol)); } } catch (Exception) { throw; } return(View(dkb)); } catch (Exception) { throw; } }