// 値を編集するためにセルを準備 protected override void Edit(CurrencyManager source, int rowNum, Rectangle bounds, bool readOnly, string instantText, bool cellIsVisible) { //comboBox1 = new ScheduleComboBox(); ScheduledDate sdate = view.Date; DateTime date = sdate.Date; Member member = view.ScheduleDateTable.Rows[rowNum][0] as Member; object value = GetColumnValueAtRow(source, rowNum); if (cellIsVisible && date.CompareTo(DateTime.Now) >= 0) { InCombo.Name = "CellEditor"; InCombo.Schedule = sdate[member]; InCombo.Bounds = new Rectangle(bounds.X + 2, bounds.Y + 2, bounds.Width - 4, bounds.Height - 4); //ComboBox_SelectedValue = value;// 初期値は自分で設定するので・・ InCombo.Visible = true; InCombo.SelectedValueChanged += new EventHandler(InCombo_ValueChanged); } else { //ComboBox_SelectedValue = value;// 初期値は自分で設定するので・・ InCombo.Visible = false; } if (InCombo.Visible) { DataGridTableStyle.DataGrid.Invalidate(bounds); } }
public async Task CreateBillPay(NwbaContext nwbaContext) { var billPay = new BillPay { AccountNumber = Account, PayeeID = Payee, Amount = Amount, ScheduleDate = ScheduledDate.ToUniversalTime(), ModifyDate = DateTime.UtcNow }; if (Period.Equals("S")) { billPay.Period = Models.Period.S; } if (Period.Equals("M")) { billPay.Period = Models.Period.M; } if (Period.Equals("Q")) { billPay.Period = Models.Period.Q; } if (Period.Equals("Y")) { billPay.Period = Models.Period.Y; } nwbaContext.BillPays.Add(billPay); await nwbaContext.SaveChangesAsync(); }
// 表示するテキスト protected virtual string getValueText(int rowNum) { sdate = view.Date; DateTime date = sdate.Date; //ScheduledDate sdate = view.sAll[date]; Member member = view.ScheduleDateTable.Rows[rowNum][0] as Member; Schedule scl = sdate[member]; Pattern obj = scl.Pattern; if (obj == null) { return(""); } return(obj.Name); }
public bool DatesAreEdited(PlannedWorkoutVM update) { return(update.Order != Order || update.ScheduledDate != ScheduledDate.ToString(Constants.DateOnlyFormatString) || update.TimeOfDay != TimeOfDay); }
public bool IsDue() { return(ScheduledDate.ToUniversalTime() < DateTime.UtcNow); }