protected void lstAirport_UpdateRowBatch(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e) { DS_Flight.AirportCodeRow row = airportTable.NewAirportCodeRow(); foreach (UltraGridCell c in e.Row.Cells) { if(c.Value!=null) row[c.Column.Key] = c.Value; } AirportBiz biz = new AirportBiz(); bool b = false; switch (e.Row.DataChanged) { case (DataChanged.Added): b = biz.AddAirportCode(row.airportCode, row.name, row.name_cn, row.country); break; case (DataChanged.Modified): b = biz.UpdateAirportCode(row.airportID, row.airportCode, row.name, row.name_cn, row.country); break; } if (b) e.Row.Style.BackColor = ColorSuccess; else e.Row.Style.BackColor = ColorFailure; }
protected void AirportCode_ServerValidate(object source, ServerValidateEventArgs args) { AirportBiz biz = new AirportBiz(); args.IsValid = biz.ValidateAirportCode(args.Value); }