示例#1
0
        public ActionResult Details(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.PoliceAccountNatureId     = CompanyEmployeeRelationlist.PoliceAccountNatureId;
                ViewBag.Station                   = CompanyEmployeeRelationlist.Station;
                ViewBag.CompanyEmployeeRelationid = id;
                object Parameter = Request["Parameter"];
                object YearMonth = Request["YearMonth"];
                ViewBag.Parameter = Parameter;
                ViewBag.YearMonth = YearMonth;
            }
            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());
        }
示例#2
0
        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());
        }
示例#3
0
        /// <summary>
        /// 添加员工
        /// </summary>
        /// <returns></returns>
        public ActionResult Add()
        {
            List <CRM_Company> CompanyList = new List <CRM_Company>();

            IBLL.ICRM_CompanyBLL bll = new BLL.CRM_CompanyBLL();

            CompanyList = bll.GetCompanyList();
            SelectList selUsers = new SelectList(CompanyList, "ID", "CompanyName", null);

            ViewBag.listCompany = selUsers;
            return(View());
        }
        [OutputCache(Location = OutputCacheLocation.None, NoStore = true)]   //清除缓存
        public JsonResult CheckCompanyName(string CompanyName)
        {
            IBLL.ICRM_CompanyBLL c_BLL = new BLL.CRM_CompanyBLL();
            bool          valid        = false;
            StringBuilder strSql       = new StringBuilder();

            strSql.Append("CompanyNameDDL_String&" + CompanyName);
            List <CRM_Company> list = c_BLL.GetByParam(null, "Desc", "CompanyName", strSql.ToString());

            if (list.Count == 0)
            {
                valid = true;
            }
            return(Json(valid, JsonRequestBehavior.AllowGet));
        }