private void LoadResultGridview() { DateTime fromdate = DateTime.ParseExact(fromTextBox.Text, "MM/dd/yyyy", CultureInfo.InvariantCulture); DateTime toDate = DateTime.ParseExact(toTextBox.Text, "MM/dd/yyyy", CultureInfo.InvariantCulture); TestManagersrb _aTestManagersrb = new TestManagersrb(); List <Testsearch> allTests = _aTestManagersrb.SearchallTest(fromdate, toDate); resultGridView.DataSource = allTests; resultGridView.DataBind(); messageLabel.Text = "Test wise Report FROM " + fromTextBox.Text + " TO" + toTextBox.Text + ""; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { TestManagersrb _aTestManagersrb = new TestManagersrb(); List <Test> teststype = _aTestManagersrb.GetallTestType(); typeDropDownList.DataSource = teststype; typeDropDownList.DataTextField = "TestType"; typeDropDownList.DataValueField = "TestTypeId"; typeDropDownList.DataBind(); List <Test> tests = _aTestManagersrb.GetallTest(); setupGridView.DataSource = tests; setupGridView.DataBind(); } }
protected void saveButton_Click(object sender, EventArgs e) { TestManagersrb _aTestManagersrb = new TestManagersrb(); Test aTest = new Test(); aTest.TestName = testNameTextBox.Text; aTest.Fee = Convert.ToDouble(feeTextBox.Text); aTest.TestTypeId = Convert.ToInt32(typeDropDownList.SelectedValue); messageLabel.Text = _aTestManagersrb.SaveTest(aTest); List <Test> tests = _aTestManagersrb.GetallTest(); setupGridView.DataSource = tests; setupGridView.DataBind(); testNameTextBox.Text = String.Empty; feeTextBox.Text = String.Empty; }
protected void searchButton_Click(object sender, EventArgs e) { if (fromTextBox.Text == "" || toTextBox.Text == "") { messageLabel.Text = "You have to input The Dates"; } else { totalTextBox.Visible = true; pdfButton.Visible = true; totalLabel.Visible = true; DateTime fromdate = DateTime.ParseExact(fromTextBox.Text, "MM/dd/yyyy", CultureInfo.InvariantCulture); DateTime toDate = DateTime.ParseExact(toTextBox.Text, "MM/dd/yyyy", CultureInfo.InvariantCulture); TestManagersrb _aTestManagersrb = new TestManagersrb(); List <Testsearch> allTests = _aTestManagersrb.SearchallTestType(fromdate, toDate); resultGridView.DataSource = allTests; resultGridView.DataBind(); totalTextBox.Text = _aTestManagersrb.GetTotalinStory6(fromdate, toDate).ToString(); } }