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