コード例 #1
0
 public fwNotification Insert(fwNotification obj)
 {
     var ID = DataUtilities.Insert("insert into fwNotification([Title], [Link], [UserID], [Read]) values(@Title,@Link,@UserID,@Read)",
         CommandType.Text, "@Title", obj.Title, "@Link", obj.Link, "@UserID", obj.UserID, "@Read", obj.Read);
     obj.ID = ID;
     return obj;
 }
コード例 #2
0
 private fwNotification CreateObj(DataRow row)
 {
     var obj = new fwNotification();
     obj.ID = (int)row["ID"];
     obj.Title = GetString(row["Title"]);
     obj.Link = GetString(row["Link"]);
     obj.UserID = GetInt(row["UserID"]);
     obj.FullName = GetString(row["Name"]);
     obj.Read = (bool)row["Read"];
     return obj;
 }