protected void showButton_Click(object sender, EventArgs e)
        {
            string fDate = dateConfiguration.GetDate(fromDateTextBox.Text);
            string tDate = dateConfiguration.GetDate(toDateTextBox.Text);

            if (fDate.Length != 10)
            {
                notificationLabel.Text = "Please give from date in Correct Date Format";
            }
            else if (tDate.Length != 10)
            {
                notificationLabel.Text = "Please give to date in Correct Date Format";
            }
            else
            {
                double fromDate = dateConfiguration.GetDateInDouble(fDate);
                double toDate   = dateConfiguration.GetDateInDouble(tDate);
                TypeWiseReporttList = new List <TypeWiseReport>();
                TypeWiseReporttList = typeWiseReportManager.GetTypeInfoByDate(fromDate, toDate);
                PopulatingGridView(TypeWiseReporttList);
            }
        }
Пример #2
0
        protected void showButton_Click(object sender, EventArgs e)
        {
            string fDate = dateConfiguration.GetDate(fromDateTextBox.Text);
            string tDate = dateConfiguration.GetDate(toDateTextBox.Text);

            if (fDate.Length != 10)
            {
                notificationLabel.Text = "Please give from date in Correct Date Format";
            }
            else if (tDate.Length != 10)
            {
                notificationLabel.Text = "Please give to date in Correct Date Format";
            }
            else
            {
                double fromDate = dateConfiguration.GetDateInDouble(fDate);
                double toDate   = dateConfiguration.GetDateInDouble(tDate);
                UnpaidBillReportList = new List <BLL.Models.UnpaidBillReport>();
                UnpaidBillReportList = unpaidBillReportManager.GetUnPaidReport(fromDate, toDate);
                PopulatingGridView(UnpaidBillReportList);
            }
        }
Пример #3
0
        protected void addButton_Click(object sender, EventArgs e)
        {
            notificationLabel.Text = "";

            string name        = nameTextBox.Text;
            string dateOfbirth = dateOfBirthDatePicker.Text;

            dateOfbirth = dateConfiguration.GetDate(dateOfbirth);
            string mobileNo = mobileNoTextBox.Text;
            int    testId   = Convert.ToInt32(testDropDownList.SelectedValue);
            string testName = testRequestManager.GetTestinformation(testId).TestName;
            double fee      = testRequestManager.GetTestinformation(testId).Fee;

            if (name.Length == 0)
            {
                notificationLabel.Text      = "Please give your Name";
                notificationLabel.ForeColor = Color.Red;
            }
            else if (dateOfbirth.Length != 10)
            {
                notificationLabel.Text      = "Please give date in Correct Date Format";
                notificationLabel.ForeColor = Color.Red;
            }
            else if (mobileNo.Length == 0)
            {
                notificationLabel.Text      = "Please give your Mobile Number";
                notificationLabel.ForeColor = Color.Red;
            }
            else if (fee.Equals(0))
            {
                notificationLabel.Text      = "Please Select a Test";
                notificationLabel.ForeColor = Color.Red;
            }
            else
            {
                Patient.Name        = name;
                Patient.MobileNo    = mobileNo;
                Patient.DateOfBirth = dateOfbirth;

                Test test = new Test();
                test.TestId   = testId;
                test.TestName = testName;
                test.Fee      = fee;
                TestList.Add(test);

                PopulatingGridView();
                notificationLabel.Text      = "Test has been added to the list";
                notificationLabel.ForeColor = Color.Green;
            }
        }