コード例 #1
0
        private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
        {
            MEmployeeLeave mv = (MEmployeeLeave)vw;

            mv.CalculateLeaveTotal();
            vw.IsModified = true;
        }
コード例 #2
0
        private void CboPoc_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
        {
            MEmployeeLeave mv = (MEmployeeLeave)vw;

            mv.CalculateLeaveTotal();
            vw.IsModified = true;
        }
コード例 #3
0
        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;
        }
コード例 #4
0
        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;
            }
        }