Esempio n. 1
0
 public fwRole Insert(fwRole obj)
 {
     var ID = DataUtilities.Insert("insert into fwRole([Title], [Code]) values(@Title, @Code)",
         CommandType.Text, "@Title", obj.Title, "@Code", obj.Code);
     obj.ID = ID;
     return obj;
 }
Esempio n. 2
0
 private fwRole CreateObj(DataRow row)
 {
     var obj = new fwRole();
     obj.ID = (int)row["ID"];
     obj.Title = (string)row["Title"];
     obj.Code = (string)row["Code"];
     return obj;
 }
Esempio n. 3
0
 public fwRole Update(fwRole obj)
 {
     var ID = DataUtilities.ExcuteNonQuery("update fwRole set [Title] = @Title, [Code] = @Code where ID=@ID",
         CommandType.Text, "@Title", obj.Title, "@Code", obj.Code, "@ID", obj.ID);
     return obj;
 }