Exemplo n.º 1
0
 public int Update_HRPerformceItem(HRPItemInfo hr)
 {
     return((int)SqlHelper.ExecuteNonQuery(SqlHelper.ConnectionStringLocalTransaction, CommandType.StoredProcedure, "Proc_U_HRPerformceItem",
                                           new SqlParameter("@HRPI_ItemID", hr.HRPI_ItemID), new SqlParameter("@HRPAT_ID", hr.HRPAT_ID),
                                           new SqlParameter("@HRPI_Items", hr.HRPI_Items), new SqlParameter("@HRPI_Contents", hr.HRPI_Contents),
                                           new SqlParameter("@HRPI_StanScore", hr.HRPI_StanScore), new SqlParameter("@HRPI_AssStandard", hr.HRPI_AssStandard),
                                           new SqlParameter("@HRPI_Remarks", hr.HRPI_Remarks)));
 }
Exemplo n.º 2
0
 public int Update_HRPerformceItem(HRPItemInfo hr)
 {
     return(iHR.Update_HRPerformceItem(hr));
 }
Exemplo n.º 3
0
    protected void BtnSubmit_Item(object sender, EventArgs e)
    {
        if (LblState.Text == "新增")
        {
            hRPItemInfo.HRPI_ItemID = Guid.NewGuid();
            hRPItemInfo.HRPAT_ID    = new Guid(Label48.Text);
            if (TextBox_newItem1.Text == "")
            {
                ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('请输入考核项目!')", true);
                return;
            }
            else
            {
                hRPItemInfo.HRPI_Items = TextBox_newItem1.Text;
            }
            hRPItemInfo.HRPI_Contents    = TextBox_newItem2.Text;
            hRPItemInfo.HRPI_StanScore   = TextBox_newItem3.Text;
            hRPItemInfo.HRPI_AssStandard = TextBox_newItem4.Text;
            hRPItemInfo.HRPI_Remarks     = TextBox_newItem5.Text;
            hRPItemInfo.HRPI_IsDeleted   = false;
            try
            {
                int i = hRPItemL.Insert_HRPerformceItem(hRPItemInfo);
                if (i <= 0)
                {
                    ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('重复的考核类型!')", true);
                    return;
                }
                BindItem("");
                UpdatePanel2.Update();
                UpdatePanel3.Update();
                TextBox_newItem1.Text = "";
                TextBox_newItem2.Text = "";
                TextBox_newItem3.Text = "";
                TextBox_newItem4.Text = "";
                Panel3.Visible        = false;
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('提交失败!" + ex + "')", true);
            }
        }

        if (LblState.Text == "编辑")
        {
            HRPItemInfo hr = new HRPItemInfo();
            hr.HRPI_ItemID      = new Guid(Label49.Text);
            hr.HRPAT_ID         = new Guid(Label48.Text);
            hr.HRPI_Items       = TextBox_newItem1.Text;
            hr.HRPI_Contents    = TextBox_newItem2.Text;
            hr.HRPI_StanScore   = TextBox_newItem3.Text;
            hr.HRPI_AssStandard = TextBox_newItem4.Text;
            hr.HRPI_Remarks     = TextBox_newItem5.Text;
            try
            {
                int i = hRPItemL.Update_HRPerformceItem(hr);
                if (i <= 0)
                {
                    ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('重复的考核类型!')", true);
                    return;
                }
                BindItem("");
                UpdatePanel2.Update();
                UpdatePanel3.Update();
                Panel3.Visible = false;
            }
            catch (Exception)
            {
                throw;
            }
        }
        AlertSum();
    }
Exemplo n.º 4
0
 public int Insert_HRPerformceItem(HRPItemInfo hr)
 {
     return(iHR.Insert_HRPerformceItem(hr));
 }
Exemplo n.º 5
0
 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();
     }
 }