Ejemplo n.º 1
0
 public void DeleteRole()
 {
     string _parm = Parameters["pparm"];
     SysRoleBiz biz = new SysRoleBiz();
     ErrorEntity ErrInfo = new ErrorEntity();
     biz.Delete(_parm, out ErrInfo);
     Response.Write(ErrInfo.ToJson());
 }
Ejemplo n.º 2
0
 public void GetGridData()
 {
     string _searchcontent = "";
     string _sortname = "";
     string _sortdirection = "";
     string _pagenumber = "";
     string _pagesize = "";
     _searchcontent = Parameters["psearchcontent"];
     _sortname = Parameters["psortname"];
     if (!string.IsNullOrEmpty(_sortname))
     {
         sSortName = _sortname;
     }
     _sortdirection = Parameters["psortdirection"];
     if (!string.IsNullOrEmpty(_sortdirection))
     {
         sSortDirection = _sortdirection;
     }
     _pagenumber = Parameters["ppagenumber"];
     if (!string.IsNullOrEmpty(_pagenumber))
     {
         sPageIndex = Convert.ToInt32(_pagenumber);
     }
     _pagesize = Parameters["ppagesize"];
     if (!string.IsNullOrEmpty(_pagesize))
     {
         sPageSize = Convert.ToInt32(_pagesize);
     }
     List<SysRole> lists = new List<SysRole>();
     SysRoleBiz biz = new SysRoleBiz();
     string _searchtext = _searchcontent;
     string wheresql = "1=1";
     if (!string.IsNullOrEmpty(_searchtext))
     {
         wheresql = "(FRoleName like '%" + _searchtext + "%')";
     }
     Int32 totalcount = 0;
     lists = biz.Select(wheresql, _sortname, _sortdirection, sPageIndex, sPageSize, out totalcount);
     string datasource = Utils.GetRepeaterDatasource(lists, sPageIndex, sPageSize, totalcount);
     Response.Write(datasource);
 }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            List<SysRole> rolelist = new List<SysRole>();
            SysRoleBiz rolebiz = new SysRoleBiz();
            rolelist = rolebiz.Select();
            AddDatasource("rolelist", rolelist);

            List<SysDepartment> deptlist = new List<SysDepartment>();
            SysDepartmentBiz deptbiz = new SysDepartmentBiz();
            deptlist = deptbiz.Select();
            AddDatasource("deptlist", deptlist);
        }
Ejemplo n.º 4
0
 public void GetRoleData()
 {
     string _id = Parameters["pid"];
     SysRoleBiz biz = new SysRoleBiz();
     SysRole item = new SysRole();
     item = biz.Select(_id);
     string datasource = Utils.ConvertToJson(item);
     Response.Write(datasource);
 }
Ejemplo n.º 5
0
 public void StopRole()
 {
     string _parm = Parameters["pparm"];
     SysRoleBiz biz = new SysRoleBiz();
     ErrorEntity ErrInfo = new ErrorEntity();
     biz.UpdateStatus(_parm, "0", out ErrInfo);
     Response.Write(ErrInfo.ToJson());
 }
Ejemplo n.º 6
0
 public void SaveRole()
 {
     string proleid = Parameters["proleid"];
     string prolename = Parameters["prolename"];
     string proledesc = Parameters["proledesc"];
     SysRoleBiz biz = new SysRoleBiz();
     SysRole item = new SysRole();
     item.FRoleId = string.IsNullOrEmpty(proleid) ? 0 : Convert.ToInt64(proleid);
     item.FRoleName = prolename;
     item.FRoleDesc = proledesc;
     ErrorEntity ErrInfo = new ErrorEntity();
     if (item.FRoleId == 0)
     {
         biz.Insert(item, out ErrInfo);
     }
     else
     {
         biz.Update(item, out ErrInfo);
     }
     Response.Write(ErrInfo.ToJson());
 }