protected void ASPxTreeList1_NodeUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { string rmes_id = e.Keys["RMES_ID"] as string; DetectBarCodeEntity entity = new DetectBarCodeEntity() { RMES_ID = rmes_id }; entity.SEQ_VALUE = e.NewValues["SEQ_VALUE"] as string; entity.SEQ_NAME = e.NewValues["SEQ_NAME"] as string; entity.SEQ_FATHER = e.NewValues["SEQ_FATHER"] as string; entity.PLINE_CODE = e.NewValues["PLINE_CODE"] as string; if (string.IsNullOrEmpty(entity.SEQ_FATHER) || entity.SEQ_FATHER == "f001") { entity.SEQ_LEVEL = "1"; } else { entity.SEQ_LEVEL = "2"; } db.Update(entity); e.Cancel = true; ASPxTreeList1.CancelEdit(); BindData(); }
protected void ASPxTreeList1_NodeDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { string rmes_id = e.Values["RMES_ID"] as string; DetectBarCodeEntity entity = new DetectBarCodeEntity() { RMES_ID = rmes_id }; db.Delete(entity); e.Cancel = true; ASPxTreeList1.CancelEdit(); BindData(); }