public JsonResult ReestridanDatrevaP(string PID, int ID) { using (var con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["INSURANCEWConnectionString"].ConnectionString)) { con.Open(); Damkoreqtirebeli larisa = new Damkoreqtirebeli(); var reestrisInfo = larisa.CamoigeReestridan(PID); var json = JsonConvert.SerializeObject(reestrisInfo); string birthDate = reestrisInfo.BIRTH_DATE.HasValue ? reestrisInfo.BIRTH_DATE.Value.ToString("yyyyMMdd") : null; larisa.DaakoreqtirePiradiMonacemebi(ID, reestrisInfo.PID, reestrisInfo.FIRST_NAME, reestrisInfo.LAST_NAME, birthDate, con); return Json(json, JsonRequestBehavior.AllowGet); } }
public void Save(int ID, string tags, string cityInput, string villageInput, string AddressInput) { Damkoreqtirebeli larisa = new Damkoreqtirebeli(); using (var con = larisa.GaxseniKavshiri()) { con.Open(); larisa.DaakoreqtireMisamarti(ID, tags, cityInput, villageInput, AddressInput, con); } }
public JsonResult ReestridanDatreva(string PID) { using (var con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["INSURANCEWConnectionString"].ConnectionString)) { con.Open(); Damkoreqtirebeli larisa = new Damkoreqtirebeli(); var reestrisInfo = larisa.CamoigeReestridan(PID); var json = JsonConvert.SerializeObject(reestrisInfo); return Json(json, JsonRequestBehavior.AllowGet); } }
//just returns partial view public PartialViewResult Koreqtireba(int ID) { var damkoreqtirebeli = new Damkoreqtirebeli(); using (var conn = damkoreqtirebeli.GaxseniKavshiri()) { var dasakoreqtirebeliKontraqti = damkoreqtirebeli.CamoigeDasakoreqtirebeliKontraqti(ID, conn); return PartialView(dasakoreqtirebeliKontraqti); } }