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; }
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; }