protected void btnGetToalHour_Click(object sender, EventArgs e) { TimeSheetDay TSD = new TimeSheetDay(); if (TSD.BeginingOfTime.ToString() != string.Empty && TSD.EndOfTime.ToString() != string.Empty) { if ((TSD.BeginingOfTime.Hour >= 8 && TSD.BeginingOfTime.Hour <= 17) && (TSD.EndOfTime.Hour >= 8 && TSD.EndOfTime.Hour <= 17)) { //lblMessage.Visible = false; decimal StartTime = Convert.ToDecimal(TSD.BeginingOfTime.Hour.ToString() + "." + TSD.BeginingOfTime.Minute.ToString()); decimal EndTime = Convert.ToDecimal(TSD.EndOfTime.Hour.ToString() + "." + TSD.EndOfTime.Minute.ToString()); txthour.Text = Convert.ToString(EndTime - StartTime); } else { lblMessage.Text = "Please check entered working strat time and end Time"; lblMessage.Visible = true; } } else { lblMessage.Text = "Please entered working strat time and end Time"; lblMessage.Visible = true; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)