public fwHtmlPage Insert(fwHtmlPage obj) { var ID = DataUtilities.Insert("insert into fwHtmlPage([KeyUrl], [Content]) values(@Key, @Content)", CommandType.Text, "@KeyUrl", obj.KeyUrl, "@Content", obj.Content); obj.ID = ID; return obj; }
private fwHtmlPage CreateObj(DataRow row) { var obj = new fwHtmlPage(); obj.ID = (int)row["ID"]; obj.KeyUrl = (string)row["KeyUrl"]; obj.Content = GetString( row["Content"]); return obj; }
public fwHtmlPage Update(fwHtmlPage obj) { var ID = DataUtilities.ExcuteNonQuery("update fwHtmlPage set [KeyUrl] = @KeyUrl, [Content]=@Content where ID=@ID", CommandType.Text, "@KeyUrl", obj.KeyUrl, "@Content", obj.Content, "@ID", obj.ID); return obj; }