Ejemplo n.º 1
0
        public void BindData()
        {
            try
            {
                List <UserInfo> userlist = bllUser.FindByLoginName(Session["LoginName"].ToString(), Convert.ToInt32(Session["SecrecyLevel"])).ToList();
                UserInfo        user     = userlist.FirstOrDefault();

                UserName.Text = bllUser.FindByUserID(user.UserInfoID);
                if (user.Sex == true)
                {
                    Sex.Text = "女";
                }
                else
                {
                    Sex.Text = "男";
                }
                Nation.Text   = user.Nation;
                Hometown.Text = user.Hometown;
                Birth.Text    = user.Birth.Value.ToShortDateString();
                AgencyID.Text = bllAgency.FindAgenName(user.AgencyID);
                string[] SecrecyLevels = new string[] { "四级", "三级", "二级", "一级", "管理员" };
                //string[] SecrecyLevels = new string[] { "公开", "内部", "秘密", "机密", "管理员" };
                SecrecyLevel.Text = SecrecyLevels[Convert.ToInt32(Session["SecrecyLevel"]) - 1];
                //TextAreaSearch.Text = "研究方向: " + user.ResearchDirection + "。专长:" + user.Specialty + "。";
                if (!string.IsNullOrEmpty(user.ResearchDirection))
                {
                    TextAreaResearchDirection.Text = user.ResearchDirection;
                }
                else
                {
                    TextAreaResearchDirection.Text = "暂无";
                }
                if (!string.IsNullOrEmpty(user.Specialty))
                {
                    TextAreaSpecialty.Text = user.Specialty;
                }
                else
                {
                    TextAreaSpecialty.Text = "暂无";
                }
                SelectByEducation();
                SelectByWork();
                SelectByEduE();
                FindUrl();
            }
            catch (Exception ex)
            {
                pm.SaveError(ex, this.Request);
            }
        }
Ejemplo n.º 2
0
        public void InitData()
        {
            try
            {
                if (Session["ID"].ToString() != "")
                {
                    DFurtherStudy dfu = df.FindByID(Convert.ToInt32(Session["ID"]));

                    tUser.Text                  = user.FindByUserID(dfu.UserInfoID.Value);
                    tStudyPlace.Text            = dfu.StudyPlace;
                    tStudySchool.Text           = dfu.StudySchool;
                    dSecrecyLevel.SelectedValue = (dfu.SecrecyLevel - 1).ToString();
                    tContent.Text               = dfu.StudyContent;
                    tDBegainTime.SelectedDate   = dfu.DBegainTime;
                    if (dfu.DEndTime != null)
                    {
                        tDEndTime.SelectedDate = dfu.DEndTime;
                    }
                    else
                    {
                        tDEndTime.SelectedDate = null;
                    }
                }
                else
                {
                    return;
                }
            }
            catch (Exception ex)
            {
                pm.SaveError(ex, this.Request);
            }
        }
Ejemplo n.º 3
0
 public void BindData()
 {
     try
     {
         SocialPartTime social = bllSocial.FindBySocialID(Convert.ToInt32(Session["SocialPartTimeID"]), Convert.ToInt32(Session["SecrecyLevel"]), true);
         UserInfoName.Text = bllUser.FindByUserID(Convert.ToInt32(social.UserInfoID));
         DropDownListLevelName.SelectedValue = social.LevelName;
         //LevelName.Text = social.LevelName;
         PartTimeName.Text     = social.PartTimeName;
         PartTimeUnit.Text     = social.PartUnitName;
         AwardDepartments.Text = social.AwardDepartments;
         Terms.Text            = social.Terms;
         DatePickerApproveTime.SelectedDate = social.ApproveTime;
         tprimaryUnit.Text = social.primaryUnit;
         Remark.Text       = social.Remark;
         DropDownListSecrecyLevel.SelectedIndex = Convert.ToInt32(social.SecrecyLevel - 1);
         if (social.Sort == "社会兼职")
         {
             ddl_sort.SelectedIndex = 0;
         }
         else
         {
             ddl_sort.SelectedIndex = 1;
         }
     }
     catch (Exception ex)
     {
         publicmethod.SaveError(ex, this.Request);
     }
 }
Ejemplo n.º 4
0
 //根据人员ID找人员名称
 public string UserName(int UserID)
 {
     try
     {
         if (UserID != 0)
         {
             return(bllUser.FindByUserID(UserID));
         }
         else
         {
             return("");
         }
     }
     catch (Exception ex)
     {
         publicmethod.SaveError(ex, this.Request);
         return("");
     }
 }
Ejemplo n.º 5
0
 public void BindData()
 {
     try
     {
         Common.Entities.Honor honor = bllHonor.FindByHonorID(Convert.ToInt32(Session["HonorID"]), true);
         UserInfoName.Text = bllUser.FindByUserID(honor.UserInfoID);
         TitleName.Text    = honor.TitleName;
         DropDownListSort.SelectedValue = honor.Sort;
         //Sort.Text = honor.Sort;
         Remark.Text      = honor.Remark;
         GivDivision.Text = honor.GivDivision;
         DatePickerGiveTime.SelectedDate        = honor.GiveTime;
         DropDownListSecrecyLevel.SelectedIndex = Convert.ToInt32(honor.SecrecyLevel - 1);
     }
     catch (Exception ex)
     {
         publicmethod.SaveError(ex, this.Request);;
     }
 }
Ejemplo n.º 6
0
 public void BindData()
 {
     try
     {
         List <EduExperience> edulist   = bllEdu.FindEduExperienceID(Convert.ToInt32(Session["EduExperienceID"]));
         EduExperience        education = edulist.FirstOrDefault();
         UserInfoName.Text = bllUser.FindByUserID(Convert.ToInt32(education.UserInfoID));
         DatePickerStartTime.SelectedDate = education.StartTime;
         DatePickerEndTime.SelectedDate   = education.EndTime;
         Major.Text       = education.Major;
         EHoldOffice.Text = education.EHoldOffice;
         DropDownListSecrecyLevel.SelectedIndex = Convert.ToInt32(education.SecrecyLevel - 1);
         Remark.Text = education.Remark;
     }
     catch (Exception ex)
     {
         publicmethod.SaveError(ex, this.Request);;
     }
 }
Ejemplo n.º 7
0
 public void BindData()
 {
     try
     {
         List <SpeakClass> list  = bllSpeak.FindSpeakClass(Convert.ToInt32(Session["SpeakClassID"]));
         SpeakClass        speak = list.FirstOrDefault();
         UserInfoName.Text = bllUser.FindByUserID(Convert.ToInt32(speak.UserInfoID));
         ClassName.Text    = speak.ClassName;
         Specialty.Text    = speak.Specialty;
         DropDownListTeachingDegree.SelectedValue = speak.TeachingDegree;
         DatePickerTeachingTime.SelectedDate      = speak.TeachingTime;
         Grade.Text = speak.Grade;
         DropDownListSecrecyLevel.SelectedIndex = Convert.ToInt32(speak.SecrecyLevel - 1);
     }
     catch (Exception ex)
     {
         publicmethod.SaveError(ex, this.Request);;
     }
 }
Ejemplo n.º 8
0
 public void BindData()
 {
     try
     {
         List <StaffDevote> list      = bllStaffDevote.FindStaffDevoteID(Convert.ToInt32(Session["StaffDevoteID"].ToString()));
         StaffDevote        Important = list.FirstOrDefault();
         UserInfoName.Text = bllUser.FindByUserID(Convert.ToInt32(Important.UserInfoID.ToString()));
         DatePickerDevoteTime.SelectedDate      = Important.DevoteTime;
         DatePickerExitTime.SelectedDate        = Important.ExitTime;
         DropDownListProjectID.SelectedValue    = bllProject.FindByid(Convert.ToInt32(Important.ProjectID)).ProjectName;
         DropDownListSecrecyLevel.SelectedValue = Important.SecrecyLevel.ToString();
         DropDownListSort.SelectedIndex         = Convert.ToInt32(Important.Sort - 1);
         tb_ProjectCompletion.Text = Important.ProjectCompletion;
     }
     catch (Exception ex)
     {
         publicmethod.SaveError(ex, this.Request);;
     }
 }
Ejemplo n.º 9
0
 public void BindData()
 {
     try
     {
         Student stu = bllStudent.FindStudents(Convert.ToInt32(Session["StudentID"]));
         T_Sno.Text   = stu.Sno;
         T_SName.Text = stu.Sname;
         if (stu.Sex == true)
         {
             rbtnBoy.Checked = true;
         }
         else
         {
             rbtnGril.Checked = true;
         }
         DropDownListDocumentType.SelectedValue = stu.DocumentType;
         T_DocumentNumber.Text = stu.DocumentNumber;
         T_Contact.Text        = stu.Contact;
         if (stu.IsGraduation == true)
         {
             IsGraduation.Checked = true;
         }
         else
         {
             NotGraduation.Checked = true;
         }
         T_Specialty.Text                       = stu.Specialty;
         T_SResearch.Text                       = stu.SResearch;
         T_SGraduationDirection.Text            = stu.SGraduationDirection;
         DropDownListType.SelectedValue         = stu.Type;
         T_UserInfoID.Text                      = bllUser.FindByUserID(Convert.ToInt32(stu.UserInfoID));
         DatePickerEnterTime.SelectedDate       = stu.EnterTime;
         DatePickerGraduationTime.SelectedDate  = stu.GraduationTime;
         DropDownListSecrecyLevel.SelectedIndex = Convert.ToInt32(stu.SecrecyLevel - 1);
         //DropDownList_Agency.SelectedValue = BLLAgency.FindByid(Convert.ToInt16(stu.AgencyID)).AgencyName;
         //newstudent.EntryPerson = Session["LoginName"].ToString();
     }
     catch (Exception ex)
     {
         publicmethod.SaveError(ex, this.Request);
     }
 }
Ejemplo n.º 10
0
 public void BindData()
 {
     try
     {
         List <WorkExperience> list = bllWork.FindByWorkID(Convert.ToInt32(Session["WorkExperienceID"]), Convert.ToInt32(Session["SecrecyLevel"]));
         WorkExperience        work = list.FirstOrDefault();
         UserInfoName.Text = bllUser.FindByUserID(Convert.ToInt32(work.UserInfoID));
         DatePickerStartTime.SelectedDate = work.StartTime;
         DatePickerEndTime.SelectedDate   = work.EndTime;
         JobTitle.Text     = work.JobTitle;
         Post.Text         = work.Post;
         WorkUnit.Text     = work.WorkUnit;
         PartTimeUnit.Text = work.PartTimeUnit;
         DropDownListSecrecyLevel.SelectedIndex = Convert.ToInt32(work.SecrecyLevel - 1);
         Remark.Text = work.Remark;
     }
     catch (Exception ex)
     {
         publicmethod.SaveError(ex, this.Request);;
     }
 }
Ejemplo n.º 11
0
 public void BindData()
 {
     try
     {
         List <Education> edulist   = bllEducation.FindByEducationID(Convert.ToInt32(Session["EducationID"]));
         Education        education = edulist.FirstOrDefault();
         UserInfoName.Text = bllUser.FindByUserID(Convert.ToInt32(education.UserInfoID));
         SchoolName.Text   = education.SchoolName;
         DropDownListDegree.SelectedValue = education.Degree;
         DatePickerEduTime.SelectedDate   = education.EduTime;
         College.Text = education.College;
         Series.Text  = education.Series;
         Major.Text   = education.Major;
         DropDownListSecrecyLevel.SelectedIndex = Convert.ToInt32(education.SecrecyLevel - 1);
         DegreeNumber.Text   = education.DegreeNumber;
         GraduateNumber.Text = education.GraduateNumber;
     }
     catch (Exception ex)
     {
         publicmethod.SaveError(ex, this.Request);
     }
 }
Ejemplo n.º 12
0
 //将人员ID转化为人员姓名
 public string UserName(int userid)
 {
     return(user.FindByUserID(userid));
 }
Ejemplo n.º 13
0
        //更新
        public void Update()
        {
            try
            {
                if (Session["LoginName"].ToString() == "")
                {
                    Response.Redirect("login.aspx");
                    Alert.Show("登录超时!");
                }
                UserInfo NewUser = new UserInfo();
                NewUser.UserName = T_UserName.Text.Trim();
                if (rbtnBoy.Checked == true)
                {
                    NewUser.Sex = true;
                }
                else
                {
                    NewUser.Sex = false;
                }
                NewUser.Nation   = DropDownListNation.SelectedItem.Text;
                NewUser.Hometown = T_Hometown.Text.Trim();
                if (DatePickerBirth.SelectedDate.HasValue)
                {
                    NewUser.Birth = DatePickerBirth.SelectedDate;
                }
                NewUser.JobTitle        = T_JobTitle.Text.Trim();
                NewUser.AgencyID        = bllAgency.SelectAgencyID(DropDownListAgencyP.SelectedText);
                NewUser.TeleNum         = T_Telenum.Text.Trim();
                NewUser.HomeNum         = T_HomeTetlum.Text.Trim();
                NewUser.OfficeNum       = T_Officenum.Text.Trim();
                NewUser.DocumentsNum    = T_DocumentsNum.Text.Trim();
                NewUser.DocumentsType   = DropDownListDocumentsType.SelectedItem.Text;
                NewUser.PoliticalStatus = DropDownListPoliticalStatus.SelectedItem.Text;
                NewUser.Profile         = TextAreaProfile.Text.Trim();
                NewUser.Education       = DropDownListEducation.SelectedItem.Text;
                NewUser.Degree          = DropDownListDegree.SelectedItem.Text;
                NewUser.StaffType       = DropDownListStaffType.SelectedItem.Text;
                NewUser.Specialty       = T_Specilty.Text.Trim();
                if (ISMarriage.Checked == true)
                {
                    NewUser.Marriage = true;
                }
                else
                {
                    NewUser.Marriage = false;
                }
                NewUser.Fax         = T_Fax.Text.Trim();
                NewUser.HomeAddress = T_HomeAddress.Text.Trim();
                NewUser.PostalCode  = T_PostalCode.Text.Trim();
                NewUser.qqNum       = T_QQnum.Text.Trim();
                NewUser.Remark      = T_Remark.Text.Trim();
                NewUser.UnitName    = T_UnitName.Text.Trim();
                //NewUser.StaffType = T_StaffType.Text.Trim();
                //NewUser.UserInfoBH = T_UserInfoBH.Text.Trim();
                NewUser.LoginName = T_LoginName.Text.Trim();
                //密码没有修改
                NewUser.LoginPWD = bllUser.IsUser(bllUser.FindByUserID(Convert.ToInt32(Session["UserInfoID"]))).LoginPWD;
                NewUser.Email    = T_Email.Text.Trim();
                NewUser.TeleNum  = T_Telenum.Text.Trim();
                NewUser.AdministrativeLevelName = DropDownListAdmin.SelectedItem.Text;
                NewUser.Domicile        = T_Domicile.Text.Trim();
                NewUser.SubjectSortName = DropDownListSubjectSortP.SelectedItem.Text;
                if (DatePickerJobTitleTime.SelectedDate.HasValue)
                {
                    NewUser.JobTitleTime = DatePickerJobTitleTime.SelectedDate;
                }
                if (DatePickerPoliticalStatusTime.SelectedDate.HasValue)
                {
                    NewUser.PoliticalStatusTime = DatePickerPoliticalStatusTime.SelectedDate;
                }
                if (IsDoctorTeacher.Checked == true)
                {
                    NewUser.IsDocdorTeacher = true;
                }
                else
                {
                    NewUser.IsDocdorTeacher = false;
                }
                if (IsMasterTeacher.Checked == true)
                {
                    NewUser.IsMasteTeacher = true;
                }
                else
                {
                    NewUser.IsMasteTeacher = false;
                }
                if (DatePickerMasterTeacherTime.SelectedDate.HasValue)
                {
                    NewUser.MasterTeacherTime = DatePickerMasterTeacherTime.SelectedDate;
                }
                if (DatePickerDoctorTeacherTime.SelectedDate.HasValue)
                {
                    NewUser.DoctorTeacherTime = DatePickerDoctorTeacherTime.SelectedDate;
                }
                NewUser.SecrecyLevel      = Convert.ToInt32(DropDownListSecrecyLevel.SelectedIndex + 1);
                NewUser.ResearchDirection = T_Reserch.Text.Trim();
                NewUser.LastSchool        = LastSchool.Text.Trim();
                NewUser.EnterSchoolTime   = DatePickerEnterSchoolTime.SelectedDate;    //入校时间;
                NewUser.StudySource       = DropDownListStudySource.SelectedItem.Text; //学缘
                //照片
                //int AttachmentID = bllUser.FindAttachmentID(Convert.ToInt32(Session["UserInfoID"]));
                int    PhotoID        = bllUser.FindPhotoID(Convert.ToInt32(Session["UserInfoID"]));
                string attachmentPath = BLLattachment.FindPath(PhotoID);
                string photoPath      = BLLattachment.FindPath(PhotoID);

                if (Session["AttachID"] != null)
                {
                    NewUser.PhotoID = int.Parse(Session["AttachID"].ToString());
                }


                NewUser.EntryPerson = bllUser.Find(Convert.ToInt32(Session["UserInfoID"]), true).EntryPerson;
                if (Convert.ToInt32(Session["SecrecyLevel"]) == 5)
                {
                    NewUser.IsPass     = true;
                    NewUser.UserInfoID = Convert.ToInt32(Session["UserInfoID"]);
                    bllUser.Update(NewUser);//更新人员基本信息表
                    PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("人员基本信息修改完成!"));
                }
                else
                {
                    NewUser.IsPass = false;
                    bllUser.ChangePass(Convert.ToInt32(Session["UserInfoID"]), false);
                    bllUser.Insert(NewUser);//插入人员基本信息表
                    //向操作日志表中插入
                    OperationLog operate = new OperationLog();
                    operate.LoginName        = NewUser.EntryPerson;
                    operate.LoginIP          = "";
                    operate.OperationType    = "更新";
                    operate.OperationContent = "UserInfo";
                    operate.OperationDataID  = Convert.ToInt32(Session["UserInfoID"]);
                    operate.OperationTime    = System.DateTime.Now;
                    operate.Remark           = NewUser.UserInfoID.ToString();
                    bllOperate.Insert(operate);
                    PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("人员基本信息已提交审核!"));
                }
            }
            catch (Exception ex)
            {
                publicmethod.SaveError(ex, this.Request);
            }
        }