Exemplo n.º 1
0
 public ActionResult Add(CRL.Package.RoleAuthorize.Role role)
 {
     CRL.Package.RoleAuthorize.RoleBusiness.Instance.Add(role);
     CRL.Package.RoleAuthorize.RoleBusiness.Instance.ClearCache();
     return Redirect(Request.UrlReferrer.ToString());
     return AutoBackResult("操作成功", Request.UrlReferrer.ToString());
 }
Exemplo n.º 2
0
 public ActionResult Add(string parentCode,CRL.Package.RoleAuthorize.Menu menu)
 {
     menu.Url = GetUrl(menu.Url).Trim(); ;
     menu.Name = menu.Name.Trim();
     menu.DataType = currentSystemId;
     CRL.Package.RoleAuthorize.MenuBusiness.Instance.Add(parentCode, menu);
     //return AutoBackResult("操作成功", Request.UrlReferrer.ToString());
     return RedirectToAction("Index", new { parentCode = parentCode });
 }
Exemplo n.º 3
0
 public ActionResult Update(CRL.Package.RoleAuthorize.Role role)
 {
     CRL.ParameCollection c = new CRL.ParameCollection();
     c["Name"] = role.Name;
     c["Remark"] = role.Remark;
     CRL.Package.RoleAuthorize.RoleBusiness.Instance.Update(b => b.Id == role.Id, c);
     return Redirect(Request.UrlReferrer.ToString());
     return AutoBackResult("操作成功", Request.UrlReferrer.ToString());
 }
Exemplo n.º 4
0
 public ActionResult Detail(CRL.Package.RoleAuthorize.Employee u)
 {
     CRL.ParameCollection c = new CRL.ParameCollection();
     c["Name"] = u.Name;
     //c["AccountNo"] = u.Name;
     c["Mobile"] = u.Mobile;
     c["qq"] = u.QQ;
     c["Email"] = u.Email;
     c["Birthday"] = u.Birthday;
     c["Sex"] = u.Sex;
     c["IdentityNo"] = u.IdentityNo;
     c["Address"] = u.Address;
     c["RegisterIp"] = u.RegisterIp;
     c["Department"] = u.Department;
     CRL.Package.RoleAuthorize.EmployeeBusiness.Instance.Update(b => b.Id == u.Id, c);
     CRL.Package.RoleAuthorize.AccessControlBusiness.Instance.Delete(b => b.Role == u.Id && b.RoleType == CRL.Package.RoleAuthorize.RoleType.用户);
     //return Redirect("/Employee/");
     return AutoBackResult("操作成功", Request.UrlReferrer.ToString());
 }
Exemplo n.º 5
0
 public ActionResult Save(CRL.Package.RoleAuthorize.Department Department)
 {
     CRL.ParameCollection c = new CRL.ParameCollection();
     c["name"] = Department.Name;
     c["Disable"] = Department.Disable;
     c["Sort"] = Department.Sort;
     CRL.Package.RoleAuthorize.DepartmentBusiness.Instance.Update(b => b.SequenceCode == Department.SequenceCode && b.DataType == 0, c);
     return JsonResult(true, "");
 }
Exemplo n.º 6
0
 public ActionResult Update(CRL.Package.RoleAuthorize.Menu menu)
 {
     CRL.ParameCollection c = new CRL.ParameCollection();
     menu.Url = GetUrl(menu.Url);
     c["Name"] = menu.Name.Trim();
     c["Url"] = menu.Url.Trim();
     c["Disable"] = menu.Disable;
     c["ShowInNav"] = menu.ShowInNav;
     c["Sort"] = menu.Sort;
     CRL.Package.RoleAuthorize.MenuBusiness.Instance.Update(b => b.Id == menu.Id, c);
     //return AutoBackResult("操作成功", Request.UrlReferrer.ToString());
     return Redirect(Request.UrlReferrer.ToString());
 }
Exemplo n.º 7
0
 /// <summary>
 ///获取列类型和默认值
 /// </summary>
 /// <param name="info"></param>
 /// <returns></returns>
 public abstract string GetColumnType(CRL.Attribute.FieldAttribute info,out string defaultValue);
Exemplo n.º 8
0
 /// <summary>
 /// 插入对象
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public abstract int InsertObject(CRL.IModel obj);
Exemplo n.º 9
0
 /// <summary>
 /// 增加列
 /// </summary>
 /// <param name="field"></param>
 /// <returns></returns>
 public abstract string GetCreateColumnScript(CRL.Attribute.FieldAttribute field);
Exemplo n.º 10
0
 /// <summary>
 /// 创建索引
 /// </summary>
 /// <param name="filed"></param>
 /// <returns></returns>
 public abstract string GetColumnIndexScript(CRL.Attribute.FieldAttribute filed);
Exemplo n.º 11
0
 public ActionResult Update(CRL.Package.RoleAuthorize.Employee u)
 {
     CRL.ParameCollection c = new CRL.ParameCollection();
     if (!string.IsNullOrEmpty(u.PassWord))
     {
         c["PassWord"] = CRL.Package.RoleAuthorize.EmployeeBusiness.Instance.EncryptPass(u.PassWord);
     }
     c["Locked"] = u.Locked;
     c["Role"] = u.Role;
     c["Department"] = u.Department;
     CRL.Package.RoleAuthorize.EmployeeBusiness.Instance.Update(b => b.Id == u.Id, c);
     return Redirect(Request.UrlReferrer.ToString());
     return AutoBackResult("操作成功", Request.UrlReferrer.ToString());
 }