Beispiel #1
0
        void loadIncidentReport()
        {
            DateTime?_dtfrom = null, _dtto = null;
            string   status_code = "";

            if (ddStatus.SelectedValue != "-1")
            {
                status_code = ddStatus.SelectedValue;
            }

            if (txtFrom.Text != "")
            {
                _dtfrom = Convert.ToDateTime(txtFrom.Text);
            }

            if (txtFrom.Text != "")
            {
                _dtto = Convert.ToDateTime(txtTo.Text);
            }

            dttemp = csql.getIncidentReport("SmartConcepcion", gvIncidentReport.PageSize, p_PageIndex, _dtfrom, _dtto, txtName.Text, status_code);

            if (dttemp.Rows.Count > 0)
            {
                norecord.Visible         = false;
                gvIncidentReport.Visible = true;

                gvIncidentReport.PageIndex        = p_PageIndex;
                gvIncidentReport.VirtualItemCount = (int)dttemp.Rows[0]["reccount"];
                loadGridView(gvIncidentReport, dttemp);
            }
            else
            {
                norecord.Visible         = true;
                gvIncidentReport.Visible = false;
            }
            upIncidentReport.Update();
        }