Exemplo n.º 1
0
 public bool AddAuthority(IAuthorities authority)
 {
     sqlString = "insert into A_Authority (Authority_Name,Url) values (@name,@url)";
     paraList  = new List <Parameter> {
         new Parameter {
             ParameterName = "@name", Value = authority.Authority_Name
         },
         new Parameter {
             ParameterName = "@url", Value = authority.Url
         }
     };
     return(sqlData.InsertOrUpdateOrDelete(sqlString, connString, paraList));
 }
Exemplo n.º 2
0
 public bool SaveAuthority(IAuthorities authority)
 {
     sqlString = "update A_Authority set Authority_Name=@authorityName, Url=@url where Authority_Id=@authorityId";
     paraList  = new List <Parameter> {
         new Parameter {
             ParameterName = "@authorityName", Value = authority.Authority_Name
         },
         new Parameter {
             ParameterName = "@url", Value = authority.Url
         },
         new Parameter {
             ParameterName = "@authorityId", Value = authority.Authority_Id
         }
     };
     return(sqlData.InsertOrUpdateOrDelete(sqlString, connString, paraList));
 }