protected void Page_Load(object sender, EventArgs e)
    {
        //System.Diagnostics.Debugger.Break();
        GetCookie();

        if (!IsPostBack)
        {
            for (int year = DateTime.Now.Year; year > (DateTime.Now.Year - 58); year--)
            {
                ListItem item = new ListItem(year.ToString(), year.ToString());
                DropDownYears.Items.Add(item);
            }

            CertificationId = Convert.ToInt64(Request.QueryString["CertificationId"]);

            ProviderCertificationbl = new ProviderCertificationBL();
            ProviderCertification   = new ProviderCertificationDTO();

            ProviderCertification = ProviderCertificationbl.GetProviderCertificationByCertificationId(ProviderId, CertificationId);

            TxtCertificationName.Text = ProviderCertification.CertificationName;
            TxtPercentage.Text        = ProviderCertification.Percentage.ToString();

            if (ProviderCertification.YearCompleted != "")
            {
                DropDownYears.Items.FindByValue(ProviderCertification.YearCompleted).Selected = true;
            }
            else
            {
                DropDownYears.Items.FindByValue("0").Selected = true;
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        ProviderId = Convert.ToInt64(Request.QueryString["Providerid"]);

        providerbl = new ProviderBL();
        if (providerbl.GetProviderImage(ProviderId) != null)
        {
            Image1.ImageUrl = "~/ShowImage.ashx?ProviderId=" + ProviderId.ToString();
        }
        else
        {
            Image1.ImageUrl = "~/Images/nopicture.gif";
        }

        if (!IsPostBack)
        {
            ProvideremploymentBL    = new ProviderEmploymentBL();
            ProviderEducationBl     = new ProviderEducationBL();
            ProviderCertificationBl = new ProviderCertificationBL();
            providerbl      = new ProviderBL();
            ProviderSkillbl = new ProviderSkillBL();

            GridViewJobExperience.DataSource = ProvideremploymentBL.GetEmploymentByProviderId(ProviderId);
            GridViewJobExperience.DataBind();

            GridViewEducation.DataSource = ProviderEducationBl.GetProviderEducationByProviderId(ProviderId);
            GridViewEducation.DataBind();

            GridViewCertification.DataSource = ProviderCertificationBl.GetProviderCertification(ProviderId);
            GridViewCertification.DataBind();

            provider           = providerbl.GetProviderIntroductionById(ProviderId);
            LblFirstName.Text  = provider.FirstName.ToString();
            LblLastName.Text   = provider.LastName.ToString();
            LblMiddleName.Text = provider.MiddleName.ToString();
            LblHave.Text       = provider.Haves;
            Lblwants.Text      = provider.Wants;
            LblOverView.Text   = provider.OverView;

            SetMetaTags(provider);
            //description.Content = provider.OverView.Substring(0, 100);

            provider         = providerbl.GetProviderContactById(ProviderId);
            LblAddress1.Text = "Hidden"; //provider.Address1;
            LblPhone.Text    = "Hidden"; //provider.Phone;
            LblEmail.Text    = "Hidden"; // provider.Email;

            keyword.Content = ProviderSkillbl.FunGetProviderSkills(ProviderId).ToString();

            DataListSkills.DataSource = ProviderSkillbl.GetProviderSkills(ProviderId);
            DataListSkills.DataBind();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        GetCookie();

        if (!IsPostBack)
        {
            CertificationId         = Convert.ToInt64(Request.QueryString["CertificationId"]);
            ProviderCertificationbl = new ProviderCertificationBL();
            rowsaffected            = ProviderCertificationbl.DeleteProviderCertification(ProviderId, CertificationId);
            Response.Redirect("~/Provider/ProfilePage.aspx");
        }
    }
    protected void BtnSave_Click(object sender, EventArgs e)
    {
        ProviderCertification = new ProviderCertificationDTO();

        ProviderCertification.ProviderId        = ProviderId;
        ProviderCertification.CertificationName = TxtCertificationName.Text.ToString();
        if (TxtPercentage.Text != null && TxtPercentage.Text != "")
        {
            ProviderCertification.Percentage = Convert.ToInt16(TxtPercentage.Text);
        }

        if (Convert.ToInt32(DropDownYears.SelectedItem.Value) != 0)
        {
            ProviderCertification.YearCompleted = DropDownYears.SelectedItem.Value;
        }

        ProviderCertificationbl = new ProviderCertificationBL();
        CertificationId         = ProviderCertificationbl.AddProviderCertification(ProviderCertification);
        Response.Redirect("~/Provider/ProfilePage.aspx");
    }
示例#5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        GetCookie();

        if (!IsPostBack)
        {
            ProvideremploymentBL    = new ProviderEmploymentBL();
            ProviderEducationBl     = new ProviderEducationBL();
            ProviderCertificationBl = new ProviderCertificationBL();
            providerbl      = new ProviderBL();
            ProviderSkillbl = new ProviderSkillBL();
        }

        Image1.ImageUrl = "~/ShowImage.ashx?ProviderId=" + ProviderId.ToString();

        GridViewJobExperience.DataSource = ProvideremploymentBL.GetEmploymentByProviderId(ProviderId);
        GridViewJobExperience.DataBind();

        GridViewEducation.DataSource = ProviderEducationBl.GetProviderEducationByProviderId(ProviderId);
        GridViewEducation.DataBind();

        GridViewCertification.DataSource = ProviderCertificationBl.GetProviderCertification(ProviderId);
        GridViewCertification.DataBind();

        provider           = providerbl.GetProviderIntroductionById(ProviderId);
        LblFirstName.Text  = provider.FirstName.ToString();
        LblLastName.Text   = provider.LastName.ToString();
        LblMiddleName.Text = provider.MiddleName.ToString();
        LblHave.Text       = provider.Haves;
        Lblwants.Text      = provider.Wants;
        LblOverView.Text   = provider.OverView;

        provider         = providerbl.GetProviderContactById(ProviderId);
        LblAddress1.Text = provider.Address1;
        LblPhone.Text    = provider.Phone;
        LblEmail.Text    = provider.Email;


        DataListSkills.DataSource = ProviderSkillbl.GetProviderSkills(ProviderId);
        DataListSkills.DataBind();
    }