protected void BtnOk_Click(object sender, EventArgs e) { int i = Convert.ToInt32(Request.QueryString["ItemId"]); wfProfile profile = (from c in context.wfProfile where c.Id == i select c).First(); if (!string.IsNullOrEmpty(txtIQScore.Text)) { profile.IQScore = Convert.ToInt16(txtIQScore.Text); } if (!string.IsNullOrEmpty(txtLanguage.Text)) { profile.LanguageScore = Convert.ToInt16(txtLanguage.Text); } if (!string.IsNullOrEmpty(txtPersonalScore.Text)) { profile.PersonalityScore = Convert.ToInt16(txtPersonalScore.Text); } if (!string.IsNullOrEmpty(txtTechnicalScore.Text)) { profile.TechnicalScore = Convert.ToInt16(txtTechnicalScore.Text); } context.SaveChanges(); }
protected void btnSave_Click(object sender, EventArgs e) { int i = Convert.ToInt32(Request.QueryString["ItemId"]); wfProfile profile = (from c in context.wfProfile where c.Id == i select c).First(); profile.Interesting = txtInteresting.Text; profile.Occupation = txtOccupation.Text; profile.YearExperiences = txtYearExperiences.Text; profile.IsDocumentsOK = chkIsDocumentOk.Checked; context.SaveChanges(); }
protected void Button1_Click(object sender, EventArgs e) { wfProfile profile = new wfProfile(); profile.Id = Convert.ToInt32(txtId.Text); profile.FistName = txtFirstName.Text; profile.LastName = txtLastName.Text; profile.Age = Convert.ToInt16(txtAge.Text); profile.Degree = txtDegree.Text; profile.IdentityNo = Convert.ToInt32(txtIdentityNo.Text); profile.IsDocumentsOK = chkOk.Checked; context.AddTowfProfile(profile); context.SaveChanges(); StartWorkflow(); }
private void DataBind(int p) { wfProfile empl = (from emp in context.wfProfile where emp.Id == p select emp).First(); txtIQScore.Text = empl.IQScore != null?empl.IQScore.ToString() : string.Empty; txtLanguage.Text = empl.LanguageScore != null?empl.LanguageScore.ToString() : string.Empty; txtPersonalScore.Text = empl.PersonalityScore != null?empl.PersonalityScore.ToString() : string.Empty; txtTechnicalScore.Text = empl.TechnicalScore != null?empl.TechnicalScore.ToString() : string.Empty; Label1.Text = empl.FistName + " " + empl.LastName; }
private void DataBind(int p) { wfProfile empl = (from emp in context.wfProfile where emp.Id == p select emp).First(); txtInteresting.Text = empl.Interesting; txtOccupation.Text = empl.Occupation; if (empl.YearExperiences != null) { txtYearExperiences.Text = empl.YearExperiences.ToString(); } chkIsDocumentOk.Checked = Convert.ToBoolean(empl.IsDocumentsOK); Label1.Text = empl.FistName + " " + empl.LastName; }