protected void lstAirline_UpdateRowBatch(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e) { DS_Airline.AirlineCodeRow row = airlineTable.NewAirlineCodeRow(); foreach (UltraGridCell c in e.Row.Cells) if(c.Value!=null) row[c.Column.Key] = c.Value; AirlineBiz biz = new AirlineBiz(); bool b = false; switch (e.Row.DataChanged) { case DataChanged.Added: b = biz.AddAirlineCode(row.airlineCode, row.name, row.name_cn); break; case DataChanged.Modified: b = biz.UpdateAirlineCode(row.airlineID, row.airlineCode, row.name, row.name_cn); break; } if (b) e.Row.Style.BackColor = ColorSuccess; else e.Row.Style.BackColor = ColorFailure; }
protected void AirlineCode_ServerValidate(object source, ServerValidateEventArgs args) { AirlineBiz biz = new AirlineBiz(); args.IsValid = biz.ValidateAirlineCode(args.Value); }