private void TextBox_TextChanged(object sender, TextChangedEventArgs e) { MEmployeeLeave mv = (MEmployeeLeave)vw; mv.CalculateLeaveTotal(); vw.IsModified = true; }
private void CboPoc_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { MEmployeeLeave mv = (MEmployeeLeave)vw; mv.CalculateLeaveTotal(); vw.IsModified = true; }
private void CmdAdd_Click(object sender, RoutedEventArgs e) { MEmployeeLeave mv = (MEmployeeLeave)vw; MLeaveRecord item = new MLeaveRecord(new CTable("")); int day = DateTime.Now.Day; item.LeaveDate = new DateTime(CUtil.StringToInt(mv.LeaveYear), CUtil.StringToInt(mv.LeaveMonth), day); mv.CalculateLeaveTotal(); mv.AddLeaveRecord(item); mv.IsModified = true; }
private void CmdDelete_Click(object sender, RoutedEventArgs e) { MEmployeeLeave mv = (MEmployeeLeave)vw; MLeaveRecord pp = (MLeaveRecord)(sender as Button).Tag; bool result = CHelper.AskConfirmMessage(pp.LeaveDate.ToString(), "CONFIRM_DELETE_ITEM"); if (result) { mv.RemoveLeaveRecord(pp); mv.CalculateLeaveTotal(); mv.IsModified = true; } }