public void BindGrid() { string[] stringdate1 = new string[3]; if (TxtFromDate.Text != "") { stringdate1 = TxtFromDate.Text.Split('/'); } else { stringdate1 = "01/01/1990".Split('/'); } DateTime FromDate = new DateTime(Convert.ToInt32(stringdate1[2]), Convert.ToInt32(stringdate1[1]), Convert.ToInt32(stringdate1[0])); string[] stringdate2 = new string[3]; if (txtTodate.Text != "") { stringdate2 = txtTodate.Text.Split('/'); } else { stringdate2 = "01/01/1990".Split('/'); } stringdate2 = txtTodate.Text.Split('/'); String Operation = ""; if (DrpReportOption.SelectedValue == "BOOK ISSUANCE") { Operation = "BOOK ISSUANCE"; } else if (DrpReportOption.SelectedValue == "BOOKS NOTCOLLECTED") { Operation = "BOOKS NOTCOLLECTED"; } else if (DrpReportOption.SelectedValue == "BOOKS RETURN STATUS") { Operation = "BOOKS RETURN STATUS"; } else if (DrpReportOption.SelectedValue == "REFERENCE BOOKS UTILIZATION") { Operation = "REFERENCE BOOKS UTILIZATION"; } else if (DrpReportOption.SelectedValue == "ALL BOOKS RETURN STATUS") { Operation = "BOOK ISSUANCE"; } else if (DrpReportOption.SelectedValue == "TRANSACTION DETAILS") { Operation = "TRANSACTION DETAILS"; } else if (DrpReportOption.SelectedValue == "BOOKS NOT RETURNED") { Operation = "BOOKS NOT RETURNED"; } DateTime EndDate = new DateTime(Convert.ToInt32(stringdate2[2]), Convert.ToInt32(stringdate2[1]), Convert.ToInt32(stringdate2[0])); DataTable Dtb = P.BindFortNightlyReport(FromDate, EndDate, Operation, Convert.ToInt32(DrpProgram.SelectedValue), Convert.ToInt32(DrpCurriculum.SelectedValue), Convert.ToInt32(DrpSemester.SelectedValue), DDLBookType.SelectedValue, DrpUserType.SelectedValue, RdbReportOption.SelectedValue); GrvDetails.DataSource = Dtb; GrvDetails.DataBind(); }