public static int Painter_SaveStep(clsPainter p) { MySqlInsert ins = new MySqlInsert(TABLE_PAINTER); foreach (var prop in p.GetType().GetProperties()) { ins.Add(prop.Name, prop.GetValue(p, null)); } string cmdSql = ins.ToString(); return(MySqlDbAccess.ExecuteNonQueryInt(cmdSql, false)); }
public static int Painter_SaveStep(clsPainter p) { MySqlInsert ins = new MySqlInsert(TABLE_PAINTER); foreach (var prop in p.GetType().GetProperties()) { ins.Add(prop.Name, prop.GetValue(p, null)); } string cmdSql = ins.ToString(); return MySqlDbAccess.ExecuteNonQueryInt(cmdSql, false); }
public static int Painter_Save(clsPainter obj) { MySqlInsert ins = new MySqlInsert(TABLE_PAINTER); foreach (var prop in obj.GetType().GetProperties()) { if (prop.Name == "left" || prop.Name == "type") ins.Add("`" + prop.Name + "`", prop.GetValue(obj, null)); else ins.Add(prop.Name, prop.GetValue(obj, null)); } string cmdSql = ins.ToString(); return MySqlDbAccess.ExecuteNonQueryInt(cmdSql, false); }