Ejemplo n.º 1
0
        //新增
        public ActionResult insert(string UserName, string RealName, string Email, string Phone, int DepartId, int RoleId)
        {
            var date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

            date = date.Replace("-", "");
            date = date.Replace(" ", "");
            date = date.Replace(":", "");
            return(Json(YuangoManager.insert(date, UserName, RealName, Email, Phone, DepartId, RoleId), JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        public ActionResult Deleteyuango(List <Role> list)
        {
            int val = 0;

            foreach (var item in list)
            {
                val = YuangoManager.delDepart(item.Id);
            }
            if (val > 0)
            {
                return(Json("删除成功", JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(Json("删除失败", JsonRequestBehavior.AllowGet));
            }
        }
Ejemplo n.º 3
0
        public ActionResult Yuango()
        {
            List <Role> list = YuangoManager.juesselect();

            //id是隐藏值,name是显示值
            list.Insert(0, new Role {
                Id = 0, RoleName = "请选择"
            });
            ViewBag.RoleId = new SelectList(list, "Id", "RoleName");

            List <Depart> list1 = YuangoManager.bumenselect();

            //id是隐藏值,name是显示值
            list1.Insert(0, new Depart {
                Id = 0, DepartName = "请选择"
            });
            ViewBag.DepartId = new SelectList(list1, "Id", "DepartName");


            return(View());
        }
Ejemplo n.º 4
0
 public ActionResult adminidup(string id, string UserName, string RealName, string Email, string Phone, int DepartId, int RoleId)//员工修改
 {
     return(Json(YuangoManager.adminidup(id, UserName, RealName, Email, Phone, DepartId, RoleId), JsonRequestBehavior.AllowGet));
 }
Ejemplo n.º 5
0
 public ActionResult adminid(int id)
 {
     return(Json(YuangoManager.adminid(id), JsonRequestBehavior.AllowGet));
 }
Ejemplo n.º 6
0
 public ActionResult delDepart(int id) //员工删除
 {
     //det.IsDelete = 1;
     return(Json(YuangoManager.delDepart(id), JsonRequestBehavior.AllowGet));
 }
Ejemplo n.º 7
0
 public ActionResult getDepart(int pageIndex, int pageSize, string name)
 {
     //根据部门名查询
     return(Json(YuangoManager.getDepartByName(pageIndex, pageSize, name), JsonRequestBehavior.AllowGet));
 }
Ejemplo n.º 8
0
 public ActionResult AdminSelect()
 {
     return(Json(YuangoManager.AdminSelect(), JsonRequestBehavior.AllowGet));
 }