public EmployementController(IEmployementService IEmployementService, ICityService ICityService, IStateService IStateService, ICountryService ICountryService, IUserService IUserService, IEmploymentCountService IEmploymentCountService) { this._IEmployementService = IEmployementService; _employement = new EmploymentDetail(); this._ICityService = ICityService; _city = new Master_City(); this._IStateService = IStateService; _state = new Master_State(); this._ICountryService = ICountryService; _country = new Master_Country(); this._IUserService = IUserService; this._IEmploymentCountService = IEmploymentCountService; }
//update City public int Updatecity(Master_City c) { int i; using (SqlConnection con = new SqlConnection(cs)) { con.Open(); string q = "update Master_City set CityName=@CityName where CityCode=@CityCode"; SqlCommand com = new SqlCommand(q, con); com.Parameters.AddWithValue("@CityCode", c.CityCode); com.Parameters.AddWithValue("@CityName", c.CityName); i = com.ExecuteNonQuery(); } return(i); }
//Add City public int AddCity(Master_City c) { int i; using (SqlConnection con = new SqlConnection(cs)) { con.Open(); string q = "insert into Master_City(CityCode,CityName,StateCode) values(@CityCode,@CityName,@StateCode)"; SqlCommand com = new SqlCommand(q, con); com.Parameters.AddWithValue("@CityCode", c.CityCode); com.Parameters.AddWithValue("@CityName", c.CityName); com.Parameters.AddWithValue("@StateCode", c.StateCode); i = com.ExecuteNonQuery(); } return(i); }
public bool Update(Master_City obj, string[] param, string spName) { throw new NotImplementedException(); }
public IEnumerable <Master_City> GetAll(Master_City obj, string[] param, string spName) { return(_ICityRepository.GetAll(obj, param, spName)); }
public JsonResult Updatecity(Master_City c) { return(Json(db.Updatecity(c), JsonRequestBehavior.AllowGet)); }
public JsonResult Addcity(Master_City c) { return(Json(db.AddCity(c), JsonRequestBehavior.AllowGet)); }