コード例 #1
0
 private bool ValidateAndSave()
 {
     try
     {
         if (objLeaveMgr.CheckForMultipleEntry(ddlLeaveType.SelectedValue.ToString(), ddlMonth.SelectedValue.ToString(), ddlYear.SelectedValue.ToString()) == true)
         {
             lblMsg.Text = "Leave already accrued of the month " + ddlMonth.SelectedItem.Text.Trim() + ", " + ddlYear.SelectedItem.Text.Trim();
             return(false);
         }
         return(true);
     }
     catch (Exception ex)
     {
         lblMsg.Text = "";
         throw (ex);
     }
 }