public ActionResult Locations(string windowno, string locationId, string AD_Language) { ViewBag.WindowNumber = windowno; Ctx ctx = new Ctx(); if (Session["Ctx"] != null) { ctx = Session["ctx"] as Ctx; ViewBag.lang = ctx.GetAD_Language(); } LocationModel obj = new LocationModel(); if (Util.GetValueOfInt(locationId) > 0) { obj = obj.GetAddressfromDataBase(locationId, ctx); } // Change By Mohit - To get country from login langauge on location form. else { if (!string.IsNullOrEmpty(AD_Language)) { DefaultCountry result = obj.GetCountryName(AD_Language, ctx); obj.Country = result.CountryName; obj.C_Country_ID = result.CountryID; } } return(PartialView(obj)); }