}
protected void selDeptName_DataBound(object sender, EventArgs e) {
//为下拉框添加第一个没有任何数据的项。 selDeptName.Items.Insert(0, \ selDeptName.SelectedIndex = 0; }
protected void selPjName_DataBound(object sender, EventArgs e) {
//为下拉框添加第一个没有任何数据的项。 selPjName.Items.Insert(0, \ selPjName.SelectedIndex = 0; }
protected void selEvaluationClass_DataBound(object sender, EventArgs e) {
//为下拉框添加第一个没有任何数据的项。 selEvaluationClass.Items.Insert(0, \ selEvaluationClass.SelectedIndex = 0; }
protected void lnkPrint_Click(object sender, EventArgs e) {
if (GridView1.Rows.Count > 0) {
Response.Redirect(\ } }
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) {
if (e.Row.RowType != DataControlRowType.DataRow) return;
//为评价按钮添加单击属性
LinkButton lnkAddNew = (LinkButton)e.Row.FindControl(\
lnkAddNew.Attributes.Add(\+ \ } }
3.2 公司评价新增页面
后台代码:
using System;
using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI;
using System.Web.UI.HtmlControls; using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using Entity; using Business;
public partial class Employees_companyEvaluateAdd : System.Web.UI.Page {
protected void Page_Load(object sender, EventArgs e)
{
txtEmpCd.Text = Request.QueryString[\
txtEmpName.Text = Request.QueryString[\
DataSet user_name;
user_name = new Users().GetUserName(Session[\
txtEvaluationEmpName.Text = user_name.Tables[\
string emp_cd = txtEmpCd.Text.ToString(); Session[\ GridView1.Visible = true;
DataSet ds = new ComyEvaluations().GetComyEvaluationByEmpcd(emp_cd); Session[\
GridView1.DataSource = ds; GridView1.DataBind();
/* //分页控件
UCPagerV2_1.TotalRecords = ds.Tables[0].Rows.Count; Session[\ UCPagerV2_1.UCdatabound();*/ }
protected void selEvaluationClass_DataBound1(object sender, EventArgs e) {
//为下拉框添加第一个没有任何数据的项。 selEvaluationClass.Items.Insert(0, \ selEvaluationClass.SelectedIndex = 0; }
protected void btnSubmit_Click(object sender, EventArgs e) {
if (txtEvaluationDate.Text == \ { //判断评价日期和评价区分是否为空
if (txtEvaluationDate.Text == \
ClientScript.RegisterStartupScript(GetType(), null, \language=\\\评价日期、评价区分不可为空!');window.close();\ else if (txtEvaluationDate.Text == \
ClientScript.RegisterStartupScript(GetType(), null, \language=\\\评价日期不可为空!');window.close();\ else
ClientScript.RegisterStartupScript(GetType(), null, \language=\\\评价区分不可为空!');window.close();\ return;
} else {
ComyEvaluation comy = new ComyEvaluation(); comy.Emp_cd = txtEmpCd.Text;
comy.Evaluation_date = txtEvaluationDate.Text;
comy.Evaluation_class = selEvaluationClass.SelectedValue; comy.Evaluation_emp_name = txtEvaluationEmpName.Text; comy.Evaluation_memo = txaEvaluationMemo.Text; comy.Flag = Convert.ToInt32(1);//flag默认值为1 comy.Chkflg = Convert.ToString('0'); //0为成功; //为gridview控件重新绑定时用到Session对象。 GridView1.Visible = true;
new ComyEvaluations().ComyEvaluationInsert(comy); DataSet
ds
=
ComyEvaluations().GetComyEvaluationByEmpcd(Request.QueryString[\
GridView1.DataSource = ds; GridView1.DataBind(); } } }
new
4.招聘管理