示例#1
0
 protected void btnGo_OnClick(object sender, EventArgs e)
 {
     try
     {
         LogBl    objLogBl       = new LogBl();
         DateTime dtFromDateTime = DateTime.ParseExact(txtFromDate.Text + " " + txtFromTime.Text, "dd/MM/yyyy HH:mm:ss",
                                                       System.Globalization.CultureInfo.InvariantCulture);
         DateTime dtToDateTime = DateTime.ParseExact(txtToDate.Text + " " + txtToTime.Text, "dd/MM/yyyy HH:mm:ss",
                                                     System.Globalization.CultureInfo.InvariantCulture);
         var objResult = objLogBl.UtilitySoftWaterStatusReport_DayWise(dtFromDateTime, dtToDateTime);
         gvReport2.DataSource = objResult.ResultDt;
         gvReport2.DataBind();
         if (gvReport2.Rows.Count > 0)
         {
             divExport.Visible = true;
             divNo.Visible     = false;
         }
         else
         {
             divExport.Visible = false;
             divNo.Visible     = true;
         }
     }
     catch (Exception ex)
     {
         log.Error("Error", ex);
         ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp",
                                            "<script>alert('Oops! There is some technical Problem. Contact to your Administrator.');</script>");
     }
 }