Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int       UserID = Convert.ToInt32(Request["UserID"] == null ? "-1" : Request["UserID"]);
        BasicInfo bi     = BasicInfo.GetBasicInfoByID(UserID);

        bi.OnJob = false;
        BasicInfo.SetBasicInfoByID(UserID, bi);
        Response.Write("<script Language='JavaScript'>alert('员工已注销!');window.location.href ='../Admin/UserFilter.aspx'</script>");
    }
Ejemplo n.º 2
0
    protected void confirm_Click(object sender, EventArgs e)
    {
        BasicInfo bi = new BasicInfo();


        bi.StaffName     = staffName.Value;
        bi.Gender        = (gender.SelectedValue == "男" ? true : false);
        bi.Race          = raceList.SelectedValue;
        bi.Birthday      = Convert.ToDateTime(birthday.Value);
        bi.Company       = comList.SelectedValue;
        bi.Department    = depList.SelectedValue;
        bi.Title         = titleList.SelectedValue;
        bi.Position      = posList.SelectedValue;
        bi.Contact       = contact.Value;
        bi.Email         = email.Value;
        bi.Address       = address.Value;
        bi.UrgentContact = urgenContact.Value;
        bi.UrgentPerson  = urgenPerson.Value;
        bi.School        = school.Value;
        bi.Major         = major.Value;
        bi.Education     = education.SelectedValue;
        bi.CardID        = cardID.Value;
        bi.Marriage      = marriage.SelectedValue;
        bi.Politics      = politicsList.SelectedValue;
        bi.OldName       = oldName.Value;
        bi.Computer      = computer.Value;
        bi.ForeignLan    = foreignLan.Value;
        bi.ForeignLev    = foreignLev.Value;
        bi.FileAddr      = fileAddr.Value;
        bi.EnterDate     = Convert.ToDateTime(enterDate.Value);
        bi.OnJob         = onJob.SelectedIndex == 0 ? true : false;

        Users user   = (Users)Session["Identify"];
        int   UserID = Convert.ToInt32(Request["UserID"] == null ? "-1" : Request["UserID"]);

        if (-1 == UserID)
        {
            bi.StaffID = user.UserID;
            BasicInfo.SetBasicInfoByID(user.UserID, bi);
            Response.Write("<script Language='JavaScript'>alert('基本信息已更新!');window.location.href ='BasicInfo.aspx'</script>");
        }
        else
        {
            bi.StaffID = UserID;
            BasicInfo.SetBasicInfoByID(UserID, bi);
            Response.Write("<script Language='JavaScript'>alert('基本信息已更新!');window.location.href ='../Admin/UserFilter.aspx'</script>");
        }
    }