示例#1
0
        protected void ASPxGridView1_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
        {
            if (ASPxGridView1.IsEditing)
            {
                string           id         = e.NewValues["RMES_ID"] as string;
                string           plineCode  = e.NewValues["PLINE_CODE"] as string;
                string           station    = e.NewValues["STATION_CODE"] as string;
                string           stationSub = e.NewValues["STATION_CODE_SUB"] as string;
                StationSubEntity entity     = StationSubFactory.GetByKey(id);
                entity.PLINE_CODE       = plineCode;
                entity.STATION_CODE     = station;
                entity.STATION_CODE_SUB = stationSub;
                StationSubFactory.Update(entity);

                e.Cancel = true;
                ASPxGridView1.CancelEdit();
                setCondition();
            }
        }