/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromChangepassword(ref DataRow row, Changepassword entity) { row.SetField("usercompany", entity.usercompany); row.SetField("username", entity.username); row.SetField("oldpassword", entity.oldpassword); row.SetField("newpassword", entity.newpassword); row.SetField("confirmpassword", entity.confirmpassword); row.SetField("userfield", entity.userfield); }
public static Changepassword BuildChangepasswordFromRow(DataRow row) { Changepassword entity = new Changepassword(); entity.usercompany = row.IsNull("usercompany") ? 0 : row.Field <int>("usercompany"); entity.username = row.IsNull("username") ? string.Empty : row.Field <string>("username"); entity.oldpassword = row.IsNull("oldpassword") ? string.Empty : row.Field <string>("oldpassword"); entity.newpassword = row.IsNull("newpassword") ? string.Empty : row.Field <string>("newpassword"); entity.confirmpassword = row.IsNull("confirmpassword") ? string.Empty : row.Field <string>("confirmpassword"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }