public static void CloseNotify(SpareEntities db, string operName, TL_NOTIFY notify) { notify.CloseOperName = operName; notify.CloseTime = DateTime.Now; notify.State = (int)BillState.Finished; AddOrUpdateNotify(db, notify); }
private void grid_CellDoubleClick(object sender, DevComponents.DotNetBar.SuperGrid.GridCellDoubleClickEventArgs e) { if (e.GridCell.ColumnIndex < 0 || e.GridCell.RowIndex < 0) { return; } _selectedData = (TL_NOTIFY)e.GridCell.GridRow.DataItem; CloseNotify(); }
private void grid_MasterGridCellActivated(object sender, DevComponents.DotNetBar.SuperGrid.GridCellActivatedEventArgs e) { if (e.NewActiveCell.ColumnIndex < 0 || e.NewActiveCell.RowIndex < 0) { return; } _selectedData = (TL_NOTIFY)e.NewActiveCell.GridRow.DataItem; prop.SelectedObject = _selectedData; }
private void Init() { _selectedData = new TL_NOTIFY(); _dataList = NotifyController.GetNewList(_db, GlobalVar.NotifytypeList); bs.DataSource = _dataList; grid.PrimaryGrid.DataSource = bs; bn.BindingSource = bs; grid.PrimaryGrid.ReadOnly = true; }
public static void AddNotify(SpareEntities db, string operName, NotifyType notifyType, string billNum, string message) { var notify = new TL_NOTIFY { NotifyType = (int)notifyType, BillNum = billNum, NotifyMessage = message, CreateOperName = operName, CreateTime = DateTime.Now, State = (int)BillState.New, CloseOperName = "", CloseTime = new DateTime(1970, 1, 1), }; db.TL_NOTIFY.Add(notify); }
private static void AddOrUpdateNotify(SpareEntities db, TL_NOTIFY notify) { db.TL_NOTIFY.AddOrUpdate(p => p.UID, notify); }