public ActionResult Create(int id) { IBLL.IEmployeeBLL e_BLL = new BLL.EmployeeBLL(); IBLL.ICityBLL city_BLL = new BLL.CityBLL(); IBLL.ICRM_CompanyBLL crm_Company_BLL = new BLL.CRM_CompanyBLL(); IBLL.IPoliceAccountNatureBLL policeAccountNature_BLL = new BLL.PoliceAccountNatureBLL(); IBLL.ICompanyEmployeeRelationBLL CompanyEmployeeRelation_BLL = new BLL.CompanyEmployeeRelationBLL(); var CompanyEmployeeRelationlist = CompanyEmployeeRelation_BLL.GetById(id); if (CompanyEmployeeRelationlist != null) { var Employeelist = e_BLL.GetById((int)CompanyEmployeeRelationlist.EmployeeId); ViewBag.Employee = Employeelist; ViewBag.CityId = CompanyEmployeeRelationlist.CityId; ViewBag.CompanyId = CompanyEmployeeRelationlist.CompanyId; ViewBag.CompanyEmployeeRelationid = id; ViewBag.Station = CompanyEmployeeRelationlist.Station; ViewBag.PoliceAccountNatureId = CompanyEmployeeRelationlist.PoliceAccountNatureId; } List <City> Citylist = city_BLL.GetAll(); ViewBag.Citylist = Citylist.ToList(); List <CRM_Company> CRM_Companylist = crm_Company_BLL.GetAll(); ViewBag.CRM_Companylist = CRM_Companylist.ToList(); List <PoliceAccountNature> PoliceAccountNaturelist = policeAccountNature_BLL.GetAll(); ViewBag.PoliceAccountNaturelist = PoliceAccountNaturelist.ToList(); return(View()); }