예제 #1
0
        private void BindGridview(string refNumber, string incidentStatus, string isAnyPersonInjured, string isTreatmentProvided, string fromDate, string toDate, int personID)
        {
            try
            {
                oDV = AdoUDIRS.GET_InvestigationHistory_Search(refNumber, incidentStatus, isAnyPersonInjured, isTreatmentProvided, fromDate, toDate, personID);

                if (AdoUDIRS.BlnError)
                {
                    //lblRMsg.Text = "Error 40, sorry, an error occured, " + AdoUDIRS.StrError;
                    return;
                }
                else if (oDV.Count == 0)
                {
                    lblMsg.Text = "No incident found.";
                    lblMsg.Attributes.Add("style", "font-size:40px; color:Red; font-weight:bold;");
                    gvVDQHistory.DataSource = null;
                    gvVDQHistory.DataBind();
                    return;
                }
                else if (oDV.Count > 0)
                {
                    gvVDQHistory.DataSource = oDV;
                    gvVDQHistory.DataBind();
                    lblMsg.Text = "";
                }
            }
            catch (Exception ex)
            {
                //lblRMsg.Text = "Error 40, sorry, an error occured, " + AdoUDIRS.StrError;
            }
        }