示例#1
0
 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);
 }
示例#2
0
 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();
 }
示例#3
0
 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;
 }
示例#4
0
 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;
 }
示例#5
0
        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);
        }
示例#6
0
 private static void AddOrUpdateNotify(SpareEntities db, TL_NOTIFY notify)
 {
     db.TL_NOTIFY.AddOrUpdate(p => p.UID, notify);
 }