Example #1
0
    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    = "新增";
    }
Example #2
0
    }//员工列表的翻页

    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();
    }//关闭员工列表
Example #3
0
    }//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的员工信息栏的“重置”
Example #4
0
    }//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的删除
Example #5
0
    }//绑定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的员工信息栏的“检索”
Example #6
0
    }//员工新增栏的“重置”

    protected void BtnAddSubmit_Click(object sender, EventArgs e)
    {
        int count = 0;

        try
        {
            Guid g2 = new Guid(Label50.Text);
            for (int i = 0; i < GridViewAdd.Rows.Count; i++)
            {
                CheckBox cbox = (CheckBox)GridViewAdd.Rows[i].FindControl("CheckBox1");
                if (cbox.Checked)
                {
                    count += 1;
                    Guid g1 = new Guid(GridViewAdd.Rows[i].Cells[0].Text.ToString());
                    hRPerfL.Insert_HRPerformAssessType_HRDDetail(g1, g2);
                }
            }
        }
        catch (Exception ex)
        {
            ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('提交失败!" + ex.ToString() + "')", true);
        }
        if (count == 0)
        {
            ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('请选择需要添加的员工!')", true);
            return;
        }
        BindGridForEmployee(Grid_Detail, con1);
        //UpdatePanel_SearchEmployee.Update();
        UpdatePanel_Grid_Detail.Update();
        BindGridForEmployee(GridViewAdd, con2);
        UpdatePanel_AddEmployee.Update();
        Panel_AddEmployee.Visible = false;
        UpdatePanel_AddEmployee.Update();
        ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('提交成功!')", true);
    }//员工新增栏的“提交”
Example #7
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();
     }
 }