예제 #1
0
        protected void btnAddWorkItem_Command(object sender, CommandEventArgs e)
        {
            var row = (sender as ImageButton).NamingContainer as GridViewRow;

            var txHour   = ((TextBox)row.FindControl("txHour")).Text;
            var txMinute = ((TextBox)row.FindControl("txMinute")).Text;

            if (txMinute.IsEmpty() || txHour.IsEmpty())
            {
                return;
            }
            CurrentData.HandleShift(txHour.ToInteger(), txMinute.ToInteger(), CurrentUser.Preferences.DailyRequiredWorkHours);
            DBController.DbShifts.UpdateWorkMonthlyData(CurrentData);
            RefreshGrid(gvWorkHours);
        }