protected void BtnNew_Click(object sender, EventArgs e) { TxtAperson.Text = ""; TxtCperson.Text = ""; Panel_NewType.Visible = false; UpdatePanel_NewType.Update(); Panel_SearchEmployee.Visible = false; Panel_Grid_Detail.Visible = false; Panel_AddEmployee.Visible = false; UpdatePanel_SearchEmployee.Update(); UpdatePanel_Grid_Detail.Update(); UpdatePanel_AddEmployee.Update(); Panel_NewType.Visible = false; UpdatePanel_NewType.Update(); Panel2.Visible = false; Panel3.Visible = false; Panel4.Visible = false; UpdatePanel2.Update(); UpdatePanel3.Update(); UpdatePanel4.Update(); Panel_NewType.Visible = true; UpdatePanel_NewType.Update(); TxtNewType.Text = ""; Label28.Text = "新增"; }
protected void BtncloseSearchEmployee_Click(object sender, EventArgs e) { Panel_SearchEmployee.Visible = false; Btnclose_Click(sender, e); UpdatePanel_SearchEmployee.Update(); UpdatePanel2.Update(); }
protected void BtncloseGrid_Detail_Click(object sender, EventArgs e) { Panel_SearchEmployee.Visible = false; UpdatePanel_SearchEmployee.Update(); Panel2.Visible = false; UpdatePanel2.Update(); }
}//已经录入年份和月份中的翻页 #endregion //点击确认按钮 protected void BtnSearchTime_Click(object sender, EventArgs e) { Panel_SearchEmployee.Visible = true; BindGridForEmployee(Grid_Detail, ""); Bind_DdlHRPtype(DropDownList1); Bind_DdlDep(DdlSearchDep); Bind_DdlPost(DdlSearchPost, ""); UpdatePanel_SearchEmployee.Update(); }
}//员工列表的翻页 protected void BtnCancelEmployee_Click(object sender, EventArgs e) { Panel_SearchEmployee.Visible = false; Panel_Grid_Detail.Visible = false; UpdatePanel_SearchEmployee.Update(); UpdatePanel_Grid_Detail.Update(); Panel_AddEmployee.Visible = false; UpdatePanel_AddEmployee.Update(); }//关闭员工列表
}//xxx的员工信息栏的“检索” protected void BtnResetEmployee_Click(object sender, EventArgs e) { TxtSearchStaffNO.Text = ""; TxtSearchName.Text = ""; DdlSearchDep.ClearSelection(); DdlSearchPost.ClearSelection(); LabelForSearchEmployee.Text = "检索前"; BindGridForEmployee(Grid_Detail, " and HRPAT_ID='" + Label50.Text + "'"); UpdatePanel_SearchEmployee.Update(); UpdatePanel_Grid_Detail.Update(); }//xxx的员工信息栏的“重置”
protected void BtnReset_Click(object sender, EventArgs e) { TxtType.Text = ""; BindGrid(""); LblStateForGrid_Type.Text = "检索前"; UpdatePanel_Grid.Update(); Panel_SearchEmployee.Visible = false; UpdatePanel_SearchEmployee.Update(); Panel2.Visible = false; UpdatePanel2.Update(); }
}//panel1中gridview的检索 protected void BtnNewPanel1_Click(object sender, EventArgs e) { Panel_SearchEmployee.Visible = false; UpdatePanel_SearchEmployee.Update(); Panel2.Visible = false; UpdatePanel2.Update(); Panel3.Visible = false; UpdatePanel3.Update(); Panel_Time.Visible = true; UpdatePanel_Time.Update(); }//panel1中gridview的新增
protected void BtnReset_Click(object sender, EventArgs e) { DdlSearchDep.ClearSelection(); DdlSearchPost.ClearSelection(); DropDownList3.ClearSelection(); DropDownList4.ClearSelection(); TxtSearchStaffNO.Text = ""; TxtSearchName.Text = ""; BindGrid_Detail(""); LblStateForGrid_Type.Text = "检索前"; UpdatePanel_SearchEmployee.Update(); }
}//xxx的员工信息栏的“检索” #region//gridview中的事件 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "EditPanel1") { Panel3.Visible = false; UpdatePanel3.Update(); GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; GridView1.SelectedIndex = row.RowIndex; LabelYear.Text = row.Cells[0].Text.ToString(); LabelMonth.Text = row.Cells[1].Text.ToString(); //this.LabelA_Person.Text = row.Cells[5].Text.ToString(); LabelA_State.Text = row.Cells[2].Text.ToString(); editFlag = row.Cells[2].Text.ToString(); if (editFlag == "已录入") { Panel_SearchEmployee.Visible = true; guidPanel1 = new Guid(); Label6.Text = guidPanel1.ToString(); //BindGridForEmployee(Grid_Detail, " and HRPYear_ID='" + guidPanel1 + "' "); BindGridForEmployee(Grid_Detail, " and HRPD_Year='" + LabelYear.Text.Trim() + "' and HRPD_Month ='" + LabelMonth.Text.Trim() + "' "); Bind_DdlHRPtype(DropDownList1); Bind_DdlDep(DdlSearchDep); Bind_DdlPost(DdlSearchPost, ""); UpdatePanel_SearchEmployee.Update(); } else { ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('在已录入状态下才能进行审核!')", true); return; } } if (e.CommandName == "EditPanel1_View") { Panel_SearchEmployee.Visible = false; UpdatePanel_SearchEmployee.Update(); Panel2.Visible = false; UpdatePanel2.Update(); GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; Grid_Detail.SelectedIndex = row.RowIndex; // Guid guidView = new Guid(e.CommandArgument.ToString()); LabelYear.Text = row.Cells[0].Text.ToString(); LabelMonth.Text = row.Cells[1].Text.ToString(); con3 = " and HRPD_Year='" + LabelYear.Text.Trim() + "' and HRPD_Month ='" + LabelMonth.Text.Trim() + "'"; Panel3.Visible = true; BindGridView3(con3); UpdatePanel3.Update(); } }
}//xxx的员工信息栏的“检索” #region//gridview中的事件 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "EditPanel1") { Panel3.Visible = false; UpdatePanel3.Update(); GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; GridView1.SelectedIndex = row.RowIndex; LabelYear.Text = row.Cells[0].Text.ToString(); LabelMonth.Text = row.Cells[1].Text.ToString(); LabelA_State.Text = row.Cells[2].Text.ToString(); editFlag = row.Cells[2].Text.ToString(); if (editFlag != "已审核") { Panel_SearchEmployee.Visible = true; //guidPanel1 = new Guid(e.CommandArgument.ToString()); Label6.Text = guidPanel1.ToString(); yearView = Convert.ToInt32(LabelYear.Text); monthView = Convert.ToInt32(LabelMonth.Text); BindGridForEmployee(Grid_Detail, " and b.HRP_Year='" + yearView + "' and b.HRP_Month='" + monthView + "'"); UpdatePanel_SearchEmployee.Update(); } else { ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('已经审核过了!')", true); return; } } if (e.CommandName == "EditPanel1_View") { Panel_SearchEmployee.Visible = false; UpdatePanel_SearchEmployee.Update(); Panel2.Visible = false; UpdatePanel2.Update(); GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; Grid_Detail.SelectedIndex = row.RowIndex; //guidView = new Guid(e.CommandArgument.ToString()); LabelYear.Text = row.Cells[0].Text.ToString(); LabelMonth.Text = row.Cells[1].Text.ToString(); yearView2 = Convert.ToInt32(LabelYear.Text); monthView2 = Convert.ToInt32(LabelMonth.Text); con3 = " and b.HRP_Year ='" + yearView2 + "' and b.HRP_Month ='" + monthView2 + "'"; Panel3.Visible = true; BindGridView3(con3); UpdatePanel3.Update(); } }
}//xxx的员工信息栏的“新增员工” protected void Grid_Detail_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Delete_Detail") { Guid guid = new Guid(e.CommandArgument.ToString()); hRPerfL.Delete_HRPerformAssessType_HRDDetail(guid); BindGridForEmployee(Grid_Detail, con1); UpdatePanel_SearchEmployee.Update(); UpdatePanel_Grid_Detail.Update(); //if (Panel_AddEmployee.Visible == true) //{ // BindGridForEmployee(GridViewAdd, con2); // UpdatePanel_AddEmployee.Update(); //} } }//属于该账套的员工列表中的Gridview的删除
}//绑定月份 #endregion protected void BtnSearchEmployee_Click(object sender, EventArgs e) { //con1 = " and b.HRPYear_ID='" + guidPanel1 + "' "; con1 = " and b.HRP_Year='" + yearView + "' and b.HRP_Month='" + monthView + "'"; con1 += TxtSearchStaffNO.Text.Trim() == "" ? "" : " and HRDD_StaffNO like '%" + TxtSearchStaffNO.Text.Trim() + "%'"; con1 += TxtSearchName.Text.Trim() == "" ? "" : " and HRDD_Name like '%" + TxtSearchName.Text.Trim() + "%'"; try { BindGridForEmployee(Grid_Detail, con1); } catch (Exception ex) { throw ex; } LblStateForGrid_Type.Text = "检索后"; UpdatePanel_SearchEmployee.Update(); }//xxx的员工信息栏的“检索”
protected void BtnOK_Click(object sender, EventArgs e) { if (CheckPerson.Text == "") { ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('标记*的为必填项,请填写完整!')", true); return; } if (Int32.Parse(CheckPerson.Text) > 10 || Int32.Parse(CheckPerson.Text) < 0) { ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('请以10分为满分进行打分!')", true); return; } Guid guid = new Guid(Label2.Text); detailInfo.HRPD_ID = guid; detailInfo.HRPD_M_Score = Convert.ToInt32(CheckPerson.Text); try { hRPerfYearL.Update_HRPerformceDetail_Manager(detailInfo); } catch (Exception ex) { throw ex; } BindGridForEmployee(Grid_Detail, "and b.HRP_Year='" + yearView + "' and b.HRP_Month='" + monthView + "'"); UpdatePanel_SearchEmployee.Update(); Panel2.Visible = false; UpdatePanel2.Update(); int state = hRPerfYearL.Search_HRPerformceYear_Manager_State(yearView, monthView); if (Label18.Text == "检索前") { BindGrid1(""); } if (Label18.Text == "检索后") { BindGrid1(con2); } UpdatePanel1.Update(); }
protected void BtnSearchEmployee_Click(object sender, EventArgs e) { con1 = TxtSearchStaffNO.Text.Trim() == "" ? "" : " and HRDD_StaffNO like '%" + TxtSearchStaffNO.Text.Trim() + "%'"; con1 += TxtSearchName.Text.Trim() == "" ? "" : " and HRDD_Name like '%" + TxtSearchName.Text.Trim() + "%'"; con1 += DdlSearchDep.SelectedValue == "" ? "" : " and HRPost.BDOS_Code ='" + DdlSearchDep.SelectedValue + "'"; con1 += DdlSearchPost.SelectedValue == "" ? "" : " and HRDDetail.HRP_ID ='" + DdlSearchPost.SelectedValue + "'"; con1 += DropDownList3.SelectedValue == "" ? "" : " and HRPerformceDetail.HRPD_Year ='" + DropDownList3.SelectedValue + "'"; con1 += DropDownList4.SelectedValue == "" ? "" : " and HRPerformceDetail.HRPD_Month ='" + DropDownList4.SelectedValue + "'"; try { BindGrid_Detail(con1); } catch (Exception ex) { throw ex; } LblStateForGrid_Type.Text = "检索后"; UpdatePanel_SearchEmployee.Update(); }
}//绑定月份 #endregion protected void BtnSearchEmployee_Click(object sender, EventArgs e) { con1 = " and HRPD_Year='" + LabelYear.Text.Trim() + "' and HRPD_Month ='" + LabelMonth.Text.Trim() + "' "; con1 += TxtSearchStaffNO.Text.Trim() == "" ? "" : " and HRDD_StaffNO like '%" + TxtSearchStaffNO.Text.Trim() + "%'"; con1 += TxtSearchName.Text.Trim() == "" ? "" : " and HRDD_Name like '%" + TxtSearchName.Text.Trim() + "%'"; con1 += DdlSearchDep.SelectedValue == "" ? "" : " and c.BDOS_Code ='" + DdlSearchDep.SelectedValue + "'"; con1 += DdlSearchPost.SelectedValue == "" ? "" : " and b.HRP_ID ='" + DdlSearchPost.SelectedValue + "'"; con1 += DropDownList1.SelectedValue == "" ? "" : " and b.HRPAT_ID ='" + DropDownList1.SelectedValue + "'"; try { BindGridForEmployee(Grid_Detail, con1); } catch (Exception ex) { throw ex; } LblStateForGrid_Type.Text = "检索后"; UpdatePanel_SearchEmployee.Update(); }//xxx的员工信息栏的“检索”
}//绑定Gridview(属于该账套的员工列表) protected void BtnSearchEmployee_Click(object sender, EventArgs e) { //string condition = con1; con1 = TxtSearchStaffNO.Text.Trim() == "" ? "" : " and HRDD_StaffNO like '%" + TxtSearchStaffNO.Text.Trim() + "%'"; con1 += TxtSearchName.Text.Trim() == "" ? "" : " and HRDD_Name like '%" + TxtSearchName.Text.Trim() + "%'"; con1 += DdlSearchDep.SelectedValue == "" ? "" : " and b.BDOS_Code ='" + DdlSearchDep.SelectedValue + "'"; con1 += DdlSearchPost.SelectedValue == "" ? "" : " and a.HRP_ID ='" + DdlSearchPost.SelectedValue + "'"; try { BindGridForEmployee(Grid_Detail, con1 + " and HRPAT_ID='" + Label50.Text + "'"); } catch (Exception ex) { throw ex; } LabelForSearchEmployee.Text = "检索后"; UpdatePanel_SearchEmployee.Update(); UpdatePanel_Grid_Detail.Update(); }//xxx的员工信息栏的“检索”
}//已经录入年份和月份中的翻页 #endregion //点击确认按钮 protected void BtnSearchTime_Click(object sender, EventArgs e) { Panel_SearchEmployee.Visible = true; BindGridForEmployee(Grid_Detail, ""); UpdatePanel_SearchEmployee.Update(); }
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "EditPanel1") { Panel3.Visible = false; UpdatePanel3.Update(); Panel_Time.Visible = false; UpdatePanel_Time.Update(); GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; Grid_Detail.SelectedIndex = row.RowIndex; LabelYear.Text = row.Cells[1].Text.ToString(); LabelMonth.Text = row.Cells[2].Text.ToString(); editFlag = row.Cells[4].Text.ToString(); guidYear = new Guid(e.CommandArgument.ToString()); if (editFlag == "未审核") { HRPerformceDetailL hRPerformceDetailL_New = new HRPerformceDetailL(); HRPerformceDetailInfo neiaInfo1_New = new HRPerformceDetailInfo(); DateTime dtimeNew = DateTime.Now; if (LabelYear.Text == "" || LabelMonth.Text == "") { ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('年份和月份不能为空!')", true); return; } DataSet dtNew = hRPItemScoreL.Search_HRDDetail_HRPerformAssessType_Year("and HRPerformAssessType.HRPAT_APerson = '" + Session["UserId"] + "'"); DataTable dtNewTable = dtNew.Tables[0]; int count = dtNewTable.Rows.Count; for (int i = 0; i < count; i++) { Guid guid = Guid.NewGuid(); neiaInfo1_New.HRPD_ID = new Guid(guid.ToString()); neiaInfo1_New.HRDD_ID = new Guid(dtNewTable.Rows[i]["HRDD_ID"].ToString()); neiaInfo1_New.HRPYear_ID = new Guid(guidYear.ToString()); neiaInfo1_New.HRPD_Year = Int32.Parse(LabelYear.Text); neiaInfo1_New.HRPD_Month = Int32.Parse(LabelMonth.Text); neiaInfo1_New.HRPD_AState = false; neiaInfo1_New.HRPD_Atime = dtimeNew; neiaInfo1_New.HRPD_APerson = ""; hRPerformceDetailL_New.Insert_HRPerformceDetail(neiaInfo1_New); } Panel_SearchEmployee.Visible = true; BindGridForEmployee(Grid_Detail, ""); Bind_DdlHRPtype(DropDownList1); Bind_DdlDep(DdlSearchDep); Bind_DdlPost(DdlSearchPost, ""); UpdatePanel_SearchEmployee.Update(); } else { ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('审核状态下不能进行录入!')", true); return; } } if (e.CommandName == "EditPanel1_View") { Panel_SearchEmployee.Visible = false; UpdatePanel_SearchEmployee.Update(); Panel_Time.Visible = false; UpdatePanel_Time.Update(); Panel2.Visible = false; UpdatePanel2.Update(); GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; Grid_Detail.SelectedIndex = row.RowIndex; Guid guidView = new Guid(e.CommandArgument.ToString()); con3 = " and HRPYear_ID ='" + guidView + "'"; Panel3.Visible = true; BindGridView3(con3); UpdatePanel3.Update(); } }//
protected void BtnOK_Click(object sender, EventArgs e) { HRPerformceDetailL hRPerformceDetailL = new HRPerformceDetailL(); HRPerformceDetailInfo neiaInfo1 = new HRPerformceDetailInfo(); HRPItemScoreL hRPItemScoreL = new HRPItemScoreL(); HRPItemScoreInfo neiaInfo2 = null; DateTime d1; if (DateTime.TryParse(TxtCheckTime.Text, out d1)) { neiaInfo1.HRPD_Atime = d1; } else { ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('请输入格式正确的培训开始日期!')", true); return; } int count = GridView2.Rows.Count; for (int i = 0; i < count; i++) { TextBox tb1 = GridView2.Rows[i].FindControl("TxtRemarks") as TextBox;//取得所在行的是否合格的列 if (tb1.Text == "") { //tb1.Text = GridView2.Rows[i].Cells[] ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('考核项目得分不能为空!')", true); flag = "不提交"; break; } else if (Int32.Parse(GridView2.Rows[i].Cells[3].Text) < Int32.Parse(tb1.Text)) { ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('项目得分不能比标准得分高!')", true); flag = "不提交"; break; } else { flag = "提交"; } } if (CheckPerson.Text == "") { flag = "不提交"; ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('请输入考核人!')", true); } if (flag == "提交") { neiaInfo1.HRDD_ID = new Guid(Label2.Text);//人事档案ID //Guid guid = Guid.NewGuid(); //LabelDetail.Text = guid.ToString(); neiaInfo1.HRPD_ID = new Guid(Label6.Text.ToString().Trim()); neiaInfo1.HRPD_APerson = CheckPerson.Text; neiaInfo1.HRPD_FinalScore = 0; neiaInfo1.HRPD_Month = Int32.Parse(LabelMonth.Text.ToString()); neiaInfo1.HRPD_Year = Int32.Parse(LabelYear.Text.ToString()); neiaInfo1.HRPD_State = false; neiaInfo1.HRPD_AState = true; //hRPerformceDetailL.Insert_HRPerformceDetail(neiaInfo1); //hRPerformceDetailL.Update_HRPerformceDetail(neiaInfo1); for (int j = 0; j < count; j++) { neiaInfo2 = new HRPItemScoreInfo(); TextBox tb2 = GridView2.Rows[j].FindControl("TxtRemarks") as TextBox;//取得所在行的是否合格的列 neiaInfo2.HRPI_ItemID = new Guid(GridView2.Rows[j].Cells[0].Text); neiaInfo2.HRPIS_ItemFScore = 0; neiaInfo2.HRPD_ID = neiaInfo1.HRPD_ID; neiaInfo2.HRPIS_ItemScore = Int32.Parse(tb2.Text); neiaInfo1.HRPD_FinalScore = neiaInfo1.HRPD_FinalScore + neiaInfo2.HRPIS_ItemScore; hRPItemScoreL.Insert_HRPItemScore(neiaInfo2); } hRPerformceDetailL.Update_HRPerformceDetail(neiaInfo1); Panel2.Visible = false; BindGridForEmployee(Grid_Detail, ""); UpdatePanel_SearchEmployee.Update(); ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('已提交!')", true); int updateState = getReturnState(); if (updateState == 0) { yearInfo.HRP_A_State = "已录入"; //RTX string message = "ERP系统消息:" + Session["UserName"].ToString() + "于" + DateTime.Now.ToString("F") + "提交了绩效考核信息,请审核。"; string sErr = RTXhelper.Send(message, "绩效考核结果审核"); if (!string.IsNullOrEmpty(sErr)) { ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('" + sErr + "')", true); } } else { yearInfo.HRP_A_State = "录入中"; } yearInfo.HRPYear_ID = guidYear; yearInfo.HRP_Year = Int32.Parse(LabelYear.Text); yearInfo.HRP_Month = Int32.Parse(LabelMonth.Text); yearInfo.HRP_C_State = "未审核"; yearInfo.HRP_C_Person = ""; hRPerfYearL.Update_HRPerformceYear(yearInfo); if (Label18.Text == "检索前") { BindGrid1(""); } if (Label18.Text == "检索后") { BindGrid1(con2); } UpdatePanel1.Update(); } }
protected void BtnOK_Click(object sender, EventArgs e) { HRPerformceDetailInfo neiaInfo1 = new HRPerformceDetailInfo(); //提交"按钮,插入新员工培训结果详情表 HRPItemScoreInfo neiaInfo2 = null; //"提交"按钮,更新新员工培训信息主表的状态 DateTime d1; if (DateTime.TryParse(TxtCheckTime.Text, out d1)) { neiaInfo1.HRPD_AuTime = d1; } else { ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('请输入格式正确的培训开始日期!')", true); return; } int count = GridView2.Rows.Count; for (int j = 0; j < count; j++) { TextBox tb1 = GridView2.Rows[j].FindControl("TxtRemarks") as TextBox;//取得所在行的是否合格的列 if (tb1.Text == "") { tb1.Text = GridView2.Rows[j].Cells[7].Text; //ScriptManager.RegisterClientScriptBlock(this.Page, typeof(Page), "alert", "alert('请输入最终得分!')", true); flag = "提交"; //break; } else if (Int32.Parse(GridView2.Rows[j].Cells[4].Text) < Int32.Parse(tb1.Text)) { ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('项目最终得分不能比标准得分高!')", true); flag = "不提交"; break; } else { flag = "提交"; } } if (CheckPerson.Text == "") { flag = "不提交"; ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('请输入审核人!')", true); } if (flag == "提交") { neiaInfo1.HRPD_ID = new Guid(Label2.Text);//人事档案ID neiaInfo1.HRPD_Auditor = CheckPerson.Text; neiaInfo1.HRPD_C_FinalScore = 0; neiaInfo1.HRPD_State = true; for (int i = 0; i < count; i++) { neiaInfo2 = new HRPItemScoreInfo(); TextBox tb = GridView2.Rows[i].FindControl("TxtRemarks") as TextBox;//取得所在行的是否合格的列 string id = GridView2.Rows[i].Cells[0].Text; neiaInfo2.HRPIS_ItemID = new Guid(GridView2.Rows[i].Cells[0].Text); neiaInfo2.HRPIS_ItemFScore = Int32.Parse(tb.Text); neiaInfo1.HRPD_C_FinalScore = neiaInfo1.HRPD_C_FinalScore + neiaInfo2.HRPIS_ItemFScore; hRPItemScoreL.Update_HRPItemScore_CHECK(neiaInfo2); } hRPerformceDetailL.Update_HRPerformceDetail_CHECK(neiaInfo1); Panel2.Visible = false; BindGridForEmployee(Grid_Detail, " and HRPD_Year='" + LabelYear.Text.Trim() + "' and HRPD_Month ='" + LabelMonth.Text.Trim() + "' "); UpdatePanel_SearchEmployee.Update(); ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('已提交!')", true); int year = Int32.Parse(LabelYear.Text); int month = Int32.Parse(LabelMonth.Text); string Person = Session["UserId"].ToString(); int state = hRPerfYearL.Search_HRPerformceYear_CHECK_State(year, month, Person); if (state == 0) { yearInfo.HRP_C_State = "已审核"; } else { yearInfo.HRP_C_State = "审核中"; } //yearInfo.HRPYear_ID = guidPanel1; //yearInfo.HRP_Year =System.Int32.Parse(this.LabelYear.Text); //yearInfo.HRP_Month = System.Int32.Parse(this.LabelMonth.Text); //yearInfo.HRP_A_State = this.LabelA_State.Text; //yearInfo.HRP_C_Person = Session["UserId"].ToString(); //hRPerfYearL.Update_HRPerformceYear(yearInfo); if (Label18.Text == "检索前") { BindGrid1(""); } if (Label18.Text == "检索后") { BindGrid1(con2); } UpdatePanel1.Update(); } }
protected void Grid_Type_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Delete_Type") { GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; Grid_Type.SelectedIndex = row.RowIndex; Guid guid = new Guid(e.CommandArgument.ToString()); hRPerfL.Delete_HRPerformAssessType(guid); hRPItemL.Delete_HRPerformceItem(guid); BindGrid(""); //BindItem(""); } if (e.CommandName == "Delete_Type_Item") { GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; Grid_Type.SelectedIndex = row.RowIndex; Guid guid = new Guid(e.CommandArgument.ToString()); //hRPerfL.Delete_HRPerformAssessType(guid); hRPItemL.Delete_HRPerformceItem(guid); //BindGrid(""); BindItem(""); } if (e.CommandName == "Edit_Post") { GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; Panel3.Visible = true; UpdatePanel3.Update(); LblState.Text = "编辑"; Label49.Text = e.CommandArgument.ToString(); id = new Guid(Label49.Text); HRPItemInfo hR = hRPItemL.SearchByID_HRPItem(id)[0]; TextBox_newItem1.Text = hR.HRPI_Items; TextBox_newItem2.Text = hR.HRPI_Contents; TextBox_newItem3.Text = hR.HRPI_StanScore; TextBox_newItem4.Text = hR.HRPI_AssStandard; TextBox_newItem5.Text = hR.HRPI_Remarks; UpdatePanel3.Update(); } if (e.CommandName == "Edit1") { Panel_NewType.Visible = false; UpdatePanel_NewType.Update(); Panel_SearchEmployee.Visible = false; Panel_Grid_Detail.Visible = false; Panel_AddEmployee.Visible = false; UpdatePanel_SearchEmployee.Update(); UpdatePanel_Grid_Detail.Update(); UpdatePanel_AddEmployee.Update(); GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; Grid_Type.SelectedIndex = row.RowIndex; Label48.Text = e.CommandArgument.ToString(); Guid guid = new Guid(Label48.Text); Panel2.Visible = true; UpdatePanel2.Update(); BindItem(""); } if (e.CommandName == "Edit2") { Panel_NewType.Visible = false; UpdatePanel_NewType.Update(); Panel2.Visible = false; Panel3.Visible = false; Panel4.Visible = false; UpdatePanel2.Update(); UpdatePanel3.Update(); UpdatePanel4.Update(); con1 = " and HRPAT_ID='" + e.CommandArgument.ToString() + "'"; GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; Grid_Type.SelectedIndex = row.RowIndex; Label50.Text = e.CommandArgument.ToString(); Guid guid = new Guid(Label50.Text); Panel_SearchEmployee.Visible = true; Panel_Grid_Detail.Visible = true; UpdatePanel_SearchEmployee.Update(); UpdatePanel_Grid_Detail.Update(); BindGridForEmployee(Grid_Detail, con1); Bind_DdlDep(DdlSearchDep); Bind_DdlPost(DdlSearchPost, ""); } if (e.CommandName == "Edit3") { GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; Panel_NewType.Visible = true; UpdatePanel_NewType.Update(); Label28.Text = "编辑"; Label27.Text = e.CommandArgument.ToString(); id = new Guid(Label27.Text); HRPtypeInfo hRType = hRPerfL.SearchByID_HRPerformAssessType(id)[0]; DataSet dtAperson = neiaL.Search_ForTeacher_HRDDetail("and UMUI_UserID like '%" + hRType.HRPAT_APerson.Trim() + "%' "); DataSet dtCperson = neiaL.Search_ForTeacher_HRDDetail("and UMUI_UserID like '%" + hRType.HRPAT_CPerson.Trim() + "%' "); TxtAperson.Text = Convert.ToString(dtAperson.Tables[0].Rows[0]["UMUI_UserName"]); TxtCperson.Text = Convert.ToString(dtCperson.Tables[0].Rows[0]["UMUI_UserName"]); DataSet dtApersonID = neiaL.Search_ForTeacher_HRDDetail("and UMUI_UserName like '%" + hRType.HRPAT_APerson + "%' "); DataSet dtCpersonID = neiaL.Search_ForTeacher_HRDDetail("and UMUI_UserName like '%" + hRType.HRPAT_CPerson + "%' "); TxtNewType.Text = hRType.HRPAT_PType; Label31.Text = hRType.HRPAT_APerson; Label32.Text = hRType.HRPAT_CPerson; UpdatePanel_NewType.Update(); } }