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 lb_save_Click(object sender, EventArgs e) { var txtbox_edu = (TextBox)GridViewEducation.FooterRow.FindControl("txtbox_edu"); var educationName = txtbox_edu.Text; var edu = new Educations(); edu.EducationName = educationName; edc.InsertorUpdateEducation(edu); txtbox_edu.Text = string.Empty; GridViewEducation.DataBind(); }
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(); }
protected void FillEducationalTrainingGrid(bool refresh) { if (refresh) { base.GetNetworkProfile(this.SubjectID, this.PredicateID); } List <EducationalTrainingState> educationalTrainingState = new List <EducationalTrainingState>(); Int64 predicate = 0; string awarduri = string.Empty; Int64 oldobjectid = 0; string oldinstitutionvalue = string.Empty; string oldlocationvalue = string.Empty; string olddegreevalue = string.Empty; string oldenddatevalue = string.Empty; string oldfieldofstudyvalue = string.Empty; string predicateuri = string.Empty; string method = string.Empty; bool editexisting = false; bool editaddnew = false; bool editdelete = false; if (this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@EditExisting").Value.ToLower() == "true" || this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@CustomEdit").Value.ToLower() == "true") { editexisting = true; } if (this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@EditAddNew").Value.ToLower() == "true" || this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@CustomEdit").Value.ToLower() == "true") { editaddnew = true; } if (this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@EditDelete").Value.ToLower() == "true" || this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@CustomEdit").Value.ToLower() == "true") { editdelete = true; } if (!editaddnew) { btnEditEducation.Visible = false; } this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject")); predicate = Convert.ToInt64(data.GetStoreNode(Server.UrlDecode(base.GetRawQueryStringItem("predicateuri")).Replace("!", "#"))); predicateuri = base.GetRawQueryStringItem("predicateuri").Replace("!", "#"); foreach (XmlNode property in (base.BaseData).SelectNodes("rdf:RDF/rdf:Description/prns:hasConnection/@rdf:resource", base.Namespaces)) { awarduri = base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description[@rdf:about='" + property.InnerText + "']/rdf:object/@rdf:resource", base.Namespaces).Value; oldobjectid = data.GetStoreNode(awarduri); if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description[@rdf:about='" + awarduri + "']/prns:trainingAtOrganization", base.Namespaces) != null) { oldinstitutionvalue = base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description[@rdf:about='" + awarduri + "']/prns:trainingAtOrganization", base.Namespaces).InnerText; } else { oldinstitutionvalue = string.Empty; } if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description[@rdf:about='" + awarduri + "']/prns:trainingLocation", base.Namespaces) != null) { oldlocationvalue = base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description[@rdf:about='" + awarduri + "']/prns:trainingLocation", base.Namespaces).InnerText; } else { oldlocationvalue = string.Empty; } if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description[@rdf:about='" + awarduri + "']/vivo:degreeEarned", base.Namespaces) != null) { olddegreevalue = base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description[@rdf:about='" + awarduri + "']/vivo:degreeEarned", base.Namespaces).InnerText; } else { olddegreevalue = string.Empty; } if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description[@rdf:about='" + awarduri + "']/prns:endDate", base.Namespaces) != null) { oldenddatevalue = base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description[@rdf:about='" + awarduri + "']/prns:endDate", base.Namespaces).InnerText; } else { oldenddatevalue = string.Empty; } if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description[@rdf:about='" + awarduri + "']/vivo:majorField", base.Namespaces) != null) { oldfieldofstudyvalue = base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description[@rdf:about='" + awarduri + "']/vivo:majorField", base.Namespaces).InnerText; } else { oldfieldofstudyvalue = string.Empty; } educationalTrainingState.Add(new EducationalTrainingState(awarduri, predicate, oldobjectid, oldinstitutionvalue, oldlocationvalue, olddegreevalue, oldenddatevalue, oldfieldofstudyvalue, editexisting, editdelete)); } if (educationalTrainingState.Count > 0) { GridViewEducation.DataSource = educationalTrainingState; GridViewEducation.DataBind(); } else { lblNoEducation.Visible = true; GridViewEducation.Visible = false; } }
protected void GridViewEducation_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e) { GridViewEducation.EditIndex = -1; GridViewEducation.DataBind(); }
protected void GridViewEducation_RowEditing(object sender, GridViewEditEventArgs e) { GridViewEducation.EditIndex = e.NewEditIndex; GridViewEducation.DataBind(); }