Beispiel #1
0
 /// <summary>
 /// 修改权限
 /// </summary>
 /// <param name="perMission"></param>
 /// <returns></returns>
 public int UpdatePerMission(PerMission perMission)
 {
     using (OracleConnection conn = DapperHelper.GetConnectionString())
     {
         conn.Open();
         string sql = @"update PERMISSION set permissionname=:permissionname,establishtime=:establishtime,uptime=:uptime where permissionid=:permissionid";
         int    i   = conn.Execute(sql, perMission);
         return(i);
     }
 }
Beispiel #2
0
 /// <summary>
 /// 根据ID显示单个权限信息
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public PerMission GetPerMissionById(int id)
 {
     using (OracleConnection conn = DapperHelper.GetConnectionString())
     {
         conn.Open();
         string     sql        = @"select PerMissionID,permissionname,establishtime,uptime from PERMISSION where permissionid=" + id;
         PerMission perMission = conn.Query <PerMission>(sql, id).FirstOrDefault();
         return(perMission);
     }
 }
Beispiel #3
0
 /// <summary>
 /// 添加权限
 /// </summary>
 /// <param name="perMission"></param>
 /// <returns></returns>
 public int AddPerMission(PerMission perMission)
 {
     using (OracleConnection conn = DapperHelper.GetConnectionString())
     {
         conn.Open();
         string sql = @"insert into PERMISSION(permissionname,establishtime,uptime) values(:permissionname,:establishtime,:uptime)";
         int    i   = conn.Execute(sql, perMission);
         return(i);
     }
 }
Beispiel #4
0
        public int UpdatePerMission(PerMission perMission)
        {
            int i = perMissionServices.UpdatePerMission(perMission);

            return(i);
        }
Beispiel #5
0
        public PerMission GetPerMissionById(int id)
        {
            PerMission perMission = perMissionServices.GetPerMissionById(id);

            return(perMission);
        }
Beispiel #6
0
        public int AddPerMission(PerMission perMission)
        {
            int i = perMissionServices.AddPerMission(perMission);

            return(i);
        }