protected void btCreateNewHCP_Click(object sender, EventArgs e)
        {
            if (ModelState.IsValid)
            {
                HealthCareProviderBO         HealthCareProviderBO  = new HealthCareProviderBO();
                DataLayer.HealthCareProvider newHealthCareProvider = new DataLayer.HealthCareProvider();
                string hcpFirstName = txtHCPFirstName.Text.Trim();
                if (!string.IsNullOrEmpty(hcpFirstName))
                {
                    newHealthCareProvider.FirstName          = hcpFirstName;
                    newHealthCareProvider.LastName           = txtHCPLastName.Text.Trim();
                    newHealthCareProvider.Speciality         = txtHCPSpeciality.Text.Trim();
                    newHealthCareProvider.RegistrationNumber = txtHCPRegistrationNumber.Text.Trim();
                    newHealthCareProvider.Active             = cbHCPActive.Checked;
                    newHealthCareProvider.DateEntered        = DateTime.Now;
                    newHealthCareProvider.UserIdEntered      = 0;
                    newHealthCareProvider.Username           = txtHCPUserName.Text.Trim();
                    newHealthCareProvider.Password           = txtHCPPassword.Text.Trim();

                    HealthCareProviderBO.Add(newHealthCareProvider);
                    HealthCareProviderBO.Save();
                    txtHCPFirstName.Text = "";
                    cbHCPActive.Checked  = false;
                    string msg = string.Format("HealthCareProvider {0} created.", hcpFirstName);

                    Response.Redirect("~/HealthCareProvider/HealthCareProviderList.aspx?msg=" + msg);
                }
                else
                {
                    string str = string.Format("Description field Can't be empty.");
                    lblMsg.Text = str;
                    return;;
                }
            }
        }
Example #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            HealthCareProviderBO healthcare = new HealthCareProviderBO();

            GridView1.VirtualItemCount = healthcare.Count(x => x.RegistrationNumber.Contains(TextBox1.Text.Trim()));
            GridView1.DataSource       = healthcare.Find(x => x.RegistrationNumber.Contains(TextBox1.Text.Trim()), 0, GridView1.PageSize)
                                         .ToList();
            GridView1.DataBind();
            Button1.Enabled = true;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            HealthCareProviderBO healthCare = new HealthCareProviderBO();

            if (!IsPostBack)
            {
                this.ReportViewer1.LocalReport.ReportPath = "HealthCareProvider/HealthCareProvider.rdlc";
                this.ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", healthCare.GetAll()));
                this.ReportViewer1.LocalReport.Refresh();
            }
        }
        private void ddHealthCareProviderIdPopulate()
        {
            //   List<NoteType> noteTypeList = new List<NoteType>();
            HealthCareProviderBO      healthCareProviderBO = new HealthCareProviderBO();
            List <SelectListItemBase> dataList             = new List <SelectListItemBase>();

            dataList = healthCareProviderBO.GetAllSelect(s => new SelectListItemBase {
                Text = s.LastName + " " + s.FirstName, Id = s.HealthCareProviderId
            });
            ddAppointmentId.DataSource     = dataList;
            ddAppointmentId.DataTextField  = "Text";
            ddAppointmentId.DataValueField = "Id";
            ddAppointmentId.DataBind();
        }
Example #5
0
        protected void btnButton1_Click(object sender, EventArgs e)
        {
            HealthCareProviderBO healthcarebo = new HealthCareProviderBO();

            HealthCareProvider user = healthcarebo.IsAuthenticatedUser(txtText1.Text, txtText2.Text);

            if (user != null)
            {
                Session.Add("User", user);
                Response.Redirect("WebForm1.aspx");
                // Response.Redirect("~/NoteType/NoteTypeList.aspx");
            }
            else
            {
                Response.Write("Try Again!!");
            }
        }
Example #6
0
        protected void btUpdateHCP_Click(object sender, EventArgs e)
        {
            if (Page.IsPostBack)
            {
                HealthCareProviderBO         HealthCareProviderBO   = new HealthCareProviderBO();
                DataLayer.HealthCareProvider editHealthCareProvider = new DataLayer.HealthCareProvider();

                int HealthCareProviderId = Convert.ToInt32(Session["PrimaryKeyHealthCareProvider"]);

                editHealthCareProvider = HealthCareProviderBO.Get(HealthCareProviderId);
                if (editHealthCareProvider == null)
                {
                    string str = string.Format("Note Type with Id {0} not found for Update.", HealthCareProviderId);
                    lblMsg.Text = str;
                    return;
                }

                string hcpFirstName = txtHCPFirstName.Text.Trim();
                if (!string.IsNullOrEmpty(hcpFirstName))
                {
                    editHealthCareProvider.FirstName     = hcpFirstName;
                    editHealthCareProvider.Active        = cbHCPActive.Checked;
                    editHealthCareProvider.DateEntered   = DateTime.Now;
                    editHealthCareProvider.UserIdEntered = 0;

                    HealthCareProviderBO.Edit(editHealthCareProvider);
                    HealthCareProviderBO.Save();
                    txtHCPFirstName.Text = "";
                    cbHCPActive.Checked  = false;


                    string msg = string.Format("HealthCareProvider {0} Updated.", hcpFirstName);

                    Response.Redirect("~/HealthCareProviderPages/HealthCareProviderList.aspx?msg=" + msg);
                }
                else
                {
                    string str = string.Format("First Name field Can't be empty.");
                    lblMsg.Text = str;
                    return;
                }
            }
        }