예제 #1
0
 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;
 }
예제 #2
0
        //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);
        }
예제 #3
0
        //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);
        }
예제 #4
0
 public bool Update(Master_City obj, string[] param, string spName)
 {
     throw new NotImplementedException();
 }
예제 #5
0
 public IEnumerable <Master_City> GetAll(Master_City obj, string[] param, string spName)
 {
     return(_ICityRepository.GetAll(obj, param, spName));
 }
예제 #6
0
 public JsonResult Updatecity(Master_City c)
 {
     return(Json(db.Updatecity(c), JsonRequestBehavior.AllowGet));
 }
예제 #7
0
 public JsonResult Addcity(Master_City c)
 {
     return(Json(db.AddCity(c), JsonRequestBehavior.AllowGet));
 }