//按科研人员搜索 public void FindByUserName() { try { ViewState["page"] = 2; Grid_MeetingName.PageIndex = 0; //查找用户名对应的人员ID int UserID = BLLUser.FindID(DropDownList_User.SelectedText); //查找人员参加的会议ID List <int?> listMeetingID = BLLAttend.FindMeetingIDByUserID(UserID, (Convert.ToInt32(Session["SecrecyLevel"]))); //查找人员参加的会议信息 List <Common.Entities.AcademicMeeting> list = BLLAcademic.FindAcademicMeetingByMeetingID(listMeetingID, (Convert.ToInt32(Session["SecrecyLevel"]))); List <int?> listID = new List <int?>(); for (int i = 0; i < list.Count(); i++) { listID.Add(list[i].AcademicMeetingID); } list = BLLAcademic.FindAcademicMeetingByMeetingID(listID, (Convert.ToInt32(Session["SecrecyLevel"]))); var res = list.Skip(Grid_MeetingName.PageIndex * Grid_MeetingName.PageSize).Take(Grid_MeetingName.PageSize).ToList(); Grid_MeetingName.RecordCount = list.Count(); this.Grid_MeetingName.DataSource = res; this.Grid_MeetingName.DataBind(); btnDelete.Enabled = false; } catch (Exception ex) { publicMethod.SaveError(ex, this.Request); } }
public void BindData() { try { page = 0; List <Common.Entities.LibraryRecord> list = new List <Common.Entities.LibraryRecord>(); if (Convert.ToInt32(Session["SecrecyLevel"]) == 5) { list = BLLLibraryRecord.FindAll("合同"); } else { int UserInfoID = BLLUser.FindID(Session["LoginName"].ToString()); list = BLLLibraryRecord.FindByBorrowPeopel(UserInfoID, "合同"); } var res = list.Skip(Grid_LibraryRecord_Pact.PageIndex * Grid_LibraryRecord_Pact.PageSize).Take(Grid_LibraryRecord_Pact.PageSize).ToList(); Grid_LibraryRecord_Pact.RecordCount = list.Count(); Grid_LibraryRecord_Pact.DataSource = res; Grid_LibraryRecord_Pact.DataBind(); btnDelete.Enabled = false; } catch (Exception ex) { publicMethod.SaveError(ex, this.Request); } }
//插入赋值 public void InSertValue() { furtherstudy.StudyPlace = tStudyPlace.Text.Trim(); furtherstudy.StudySchool = tStudySchool.Text.Trim(); furtherstudy.SecrecyLevel = Convert.ToInt32(dSecrecyLevel.SelectedIndex + 1); furtherstudy.DBegainTime = tDBegainTime.SelectedDate; furtherstudy.DEndTime = tDEndTime.SelectedDate; furtherstudy.UserInfoID = user.FindID(tUser.Text.Trim()); furtherstudy.StudyContent = tContent.Text.Trim(); }
//根据人员姓名查询 private void FindByName() { try{ ViewState["page"] = 2; Grid_FurtherStudy.PageIndex = 0; int userid = user.FindID(tb_content.Text.Trim()); List <DFurtherStudy> list = df.FindByName(userid, Convert.ToInt32(Session["SecrecyLevel"])); Grid_FurtherStudy.RecordCount = list.Count; Grid_FurtherStudy.DataSource = list.Skip(Grid_FurtherStudy.PageIndex * Grid_FurtherStudy.PageSize).Take(Grid_FurtherStudy.PageSize); Grid_FurtherStudy.DataBind(); btnDelete.Enabled = false; } catch (Exception ex) { pm.SaveError(ex, this.Request); } }
//更新赋值 public void UpdateValue() { dfurtherstudy.UserInfoID = user.FindID(tUser.Text.Trim()); dfurtherstudy.StudySchool = tStudySchool.Text.Trim(); dfurtherstudy.StudyPlace = tStudyPlace.Text.Trim(); dfurtherstudy.SecrecyLevel = Convert.ToInt32(dSecrecyLevel.SelectedIndex + 1); dfurtherstudy.DBegainTime = tDBegainTime.SelectedDate; if (tDEndTime.Text.Trim() != "") { dfurtherstudy.DEndTime = Convert.ToDateTime(tDEndTime.Text.Trim()); } else { dfurtherstudy.DEndTime = null; } dfurtherstudy.StudyContent = tContent.Text.Trim(); dfurtherstudy.EntryPerson = df.FindByID(Convert.ToInt32(Session["ID"])).EntryPerson; }
//保存 protected void Save_Click(object sender, EventArgs e) { try { if (UserInfoName.Text.Trim() != "") { if (bllUser.IsUser(UserInfoName.Text.Trim()) != null) { if (bllUser.IsUser(UserInfoName.Text.Trim()).IsPass == true) { if (WorkUnit.Text.Trim() == "") { Alert.ShowInTop("工作单位不能为空!"); WorkUnit.Text = ""; return; } if (Post.Text.Trim() == "") { Alert.ShowInTop("职务不能为空!"); Post.Text = ""; return; } if (JobTitle.Text.Trim() == "") { Alert.ShowInTop("职称不能为空!"); JobTitle.Text = ""; return; } WorkExperience work = new WorkExperience(); work.UserInfoID = bllUser.FindID(UserInfoName.Text.Trim()); work.StartTime = DatePickerStartTime.SelectedDate; if (DatePickerEndTime.SelectedDate.HasValue) { if (DatePickerEndTime.SelectedDate < DatePickerStartTime.SelectedDate) { Alert.ShowInTop("结束时间不能小于开始时间!"); return; } else { work.EndTime = DatePickerEndTime.SelectedDate; } } work.PartTimeUnit = PartTimeUnit.Text.Trim(); work.JobTitle = JobTitle.Text.Trim(); work.Post = Post.Text.Trim(); work.WorkUnit = WorkUnit.Text.Trim(); work.SecrecyLevel = DropDownListSecrecyLevel.SelectedIndex + 1; work.EntryPerson = bllWork.Find(Convert.ToInt32(Session["WorkExperienceID"])).EntryPerson; work.Remark = Remark.Text.Trim(); if (Convert.ToInt32(Session["SecrecyLevel"]) != 5) { bllWork.UpdateIsPass(Convert.ToInt32(Session["WorkExperienceID"]), false); work.IsPass = false; bllWork.InsertForPeople(work);//插入工作经历表 OperationLog operate = new OperationLog(); operate.LoginName = bllWork.Find(Convert.ToInt32(Session["WorkExperienceID"])).EntryPerson; operate.LoginIP = ""; operate.OperationType = "更新"; operate.OperationContent = "WorkExperience"; operate.OperationDataID = Convert.ToInt32(Session["WorkExperienceID"]); operate.OperationTime = System.DateTime.Now; operate.Remark = work.WorkExperienceID.ToString(); bllOperate.Insert(operate);//插入操作表 PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("人员工作经历信息已提交审核!")); } else { work.IsPass = true; work.WorkExperienceID = Convert.ToInt32(Session["WorkExperienceID"]); bllWork.Update(work);//修改工作经历表 PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("人员工作经历信息已修改完成!")); } } else { Alert.ShowInTop("该人员正在审核中!"); } } else { Alert.ShowInTop("人员不存在!"); } } else { Alert.ShowInTop("人员不能为空!"); UserInfoName.Text = ""; return; } } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }
//保存 protected void Save_Click(object sender, EventArgs e) { try { if (UserInfoName.Text.Trim() != "") { if (bllUser.IsUser(UserInfoName.Text.Trim()) != null) { if (bllUser.IsUser(UserInfoName.Text.Trim()).IsPass == true) { if (SchoolName.Text.Trim() == "") { Alert.ShowInTop("学校名称不能为空!"); SchoolName.Text = ""; return; } Education education = new Education(); education.UserInfoID = bllUser.FindID(UserInfoName.Text.Trim()); education.SchoolName = SchoolName.Text.Trim(); education.College = College.Text.Trim(); education.EduTime = DatePickerEduTime.SelectedDate; education.Degree = DropDownListDegree.SelectedItem.Text; education.Series = Series.Text.Trim(); education.Major = Major.Text.Trim(); education.SecrecyLevel = DropDownListSecrecyLevel.SelectedIndex + 1; education.EntryPerson = bllEducation.Find(Convert.ToInt32(Session["EducationID"])).EntryPerson; education.GraduateNumber = GraduateNumber.Text.Trim(); education.DegreeNumber = DegreeNumber.Text.Trim(); if (Convert.ToInt32(Session["SecrecyLevel"]) != 5) { bllEducation.UpdateIsPass(Convert.ToInt32(Session["EducationID"]), false); education.IsPass = false; bllEducation.InsertForPeople(education);//插入学历表 OperationLog operate = new OperationLog(); operate.LoginName = bllEducation.Find(Convert.ToInt32(Session["EducationID"])).EntryPerson; operate.LoginIP = ""; operate.OperationType = "更新"; operate.OperationContent = "Education"; operate.OperationDataID = Convert.ToInt32(Session["EducationID"]); operate.OperationTime = System.DateTime.Now; operate.Remark = education.EducationID.ToString(); bllOperate.Insert(operate);//插入操作表 PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("人员学历信息已提交审核!")); } else { education.IsPass = true; education.EducationID = Convert.ToInt32(Session["EducationID"]); bllEducation.Update(education);//更新学历表 PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("人员学历信息已修改完成!")); } } else { Alert.ShowInTop("该人员尚未通过审核!"); } } else { Alert.ShowInTop("人员不存在!"); UserInfoName.Text = ""; } } else { Alert.ShowInTop("人员名称不能为空!"); UserInfoName.Text = ""; return; } } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }
//保存 protected void Save_Click(object sender, EventArgs e) { try { if (T_UserInfoID.Text.Trim() != "") { if (bllUser.IsUser(T_UserInfoID.Text.Trim()) != null) { if (bllUser.IsUser(T_UserInfoID.Text.Trim()).IsPass == true) { if (T_Sno.Text.Trim() == "") { Alert.ShowInTop("学号不能为空!"); T_Sno.Text = ""; return; } if (T_SName.Text.Trim() == "") { Alert.ShowInTop("姓名不能为空!"); T_SName.Text = ""; return; } if (T_Specialty.Text.Trim() == "") { Alert.ShowInTop("专业不能为空!"); T_Specialty.Text = ""; return; } if (T_SResearch.Text.Trim() == "") { Alert.ShowInTop("研究方向不能为空!"); T_SResearch.Text = ""; return; } if (bllStudent.IsSnoAndTeacher(T_Sno.Text.Trim(), Convert.ToInt32(bllUser.FindID(T_UserInfoID.Text.Trim().ToString()))) == null) { Student newstudent = new Student(); newstudent.Sno = T_Sno.Text.Trim(); newstudent.Sname = T_SName.Text.Trim(); if (rbtnBoy.Checked == true) { newstudent.Sex = true; } else { newstudent.Sex = false; } newstudent.DocumentType = DropDownListDocumentType.SelectedItem.Text; newstudent.DocumentNumber = T_DocumentNumber.Text.Trim(); newstudent.Contact = T_Contact.Text.Trim(); if (IsGraduation.Checked == true) { newstudent.IsGraduation = true; } else { newstudent.IsGraduation = false; } newstudent.Specialty = T_Specialty.Text.Trim(); newstudent.SResearch = T_SResearch.Text.Trim(); newstudent.SGraduationDirection = T_SGraduationDirection.Text.Trim(); newstudent.Type = DropDownListType.SelectedItem.Text; newstudent.UserInfoID = bllUser.FindID(T_UserInfoID.Text); newstudent.EnterTime = DatePickerEnterTime.SelectedDate; newstudent.AgencyID = BLLAgency.SelectAgencyID(DropDownList_Agency.SelectedText); if (DatePickerGraduationTime.SelectedDate.HasValue) { if (DatePickerGraduationTime.SelectedDate < DatePickerEnterTime.SelectedDate) { Alert.ShowInTop("毕业时间不能小于入学时间!"); return; } else { newstudent.GraduationTime = DatePickerGraduationTime.SelectedDate; } } newstudent.SecrecyLevel = DropDownListSecrecyLevel.SelectedIndex + 1; newstudent.EntryPerson = bllUser.FindByLoginName(Session["LoginName"].ToString()).UserName; if (Convert.ToInt32(Session["SecrecyLevel"]) != 5) { newstudent.IsPass = false; bllStudent.InsertForPeople(newstudent);//插入学生情况表 OperationLog operate = new OperationLog(); operate.LoginName = bllUser.FindByLoginName(Session["LoginName"].ToString()).UserName; operate.LoginIP = ""; operate.OperationType = "添加"; operate.OperationContent = "Student"; operate.OperationDataID = bllStudent.SelectByStudentID(newstudent.Sno); operate.OperationTime = System.DateTime.Now; operate.Remark = ""; bllOperate.Insert(operate);//插入操作表 PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("学生情况信息已提交审核!")); } else { newstudent.IsPass = true; bllStudent.InsertForPeople(newstudent);//插入学生情况表 PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("学生情况信息已添加完成!")); } } else { Alert.ShowInTop("已存在学号为" + T_Sno.Text + ", 授课老师为" + T_UserInfoID.Text + "的信息"); T_Sno.Text = ""; } } else { Alert.ShowInTop("授课老师尚未通过审核!"); } } else { Alert.ShowInTop("授课老师不存在!"); T_UserInfoID.Text = ""; } } else { Alert.ShowInTop("授课老师不能为空!"); T_UserInfoID.Text = ""; return; } } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }
//保存 protected void Save_Click(object sender, EventArgs e) { try { if (UserInfoName.Text.Trim() != "") { if (bllUser.IsUser(UserInfoName.Text.Trim()) != null) { devote.UserInfoID = bllUser.FindID(UserInfoName.Text.Trim()); devote.DevoteTime = DatePickerDevoteTime.SelectedDate; if (DatePickerExitTime.SelectedDate.HasValue) { if (DatePickerExitTime.SelectedDate < DatePickerDevoteTime.SelectedDate) { Alert.ShowInTop("退出时间不能小于开始时间!"); return; } else { devote.ExitTime = DatePickerExitTime.SelectedDate; } } devote.ExitTime = DatePickerExitTime.SelectedDate; devote.ProjectID = bllProject.SelectProjectID(DropDownListProjectID.SelectedText.ToString()); devote.SecrecyLevel = DropDownListSecrecyLevel.SelectedIndex + 1; devote.Sort = DropDownListSort.SelectedIndex + 1; devote.EntryPerson = bllUser.FindByLoginName(Session["LoginName"].ToString()).UserName; devote.ProjectCompletion = tb_ProjectCompletion.Text.Trim(); if (Convert.ToInt32(Session["SecrecyLevel"]) != 5) { devote.IsPass = false; } else { devote.IsPass = true; } if (devote.Sort > 0 && devote.Sort <= 60) { if (bllStaffDevote.IsNullUserInfoID(Convert.ToInt32(devote.UserInfoID.ToString()), Convert.ToInt32(devote.ProjectID.ToString())) == null) { if (bllStaffDevote.IsNullSort(Convert.ToInt32(devote.ProjectID.ToString()), Convert.ToInt32(devote.Sort)) == null) { if (Convert.ToInt32(Session["SecrecyLevel"]) != 5) { bllStaffDevote.Insert(devote); OperationLog operate = new OperationLog(); operate.LoginName = bllUser.FindByLoginName(Session["LoginName"].ToString()).UserName; operate.OperationType = "添加"; operate.OperationContent = "StaffDevote"; operate.OperationDataID = bllStaffDevote.FindStaffDevoteID(Convert.ToInt32(devote.UserInfoID.ToString()), Convert.ToInt32(devote.ProjectID.ToString())); operate.LoginIP = ""; operate.OperationTime = DateTime.Now; bllOperate.Insert(operate); PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("您的操作已提交审核,请等待!")); } else { bllStaffDevote.Insert(devote); PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("项目人员投入信息添加完成!")); } } else { if (bllStaffDevote.IsNullSort(Convert.ToInt32(devote.ProjectID.ToString()), Convert.ToInt32(devote.Sort)).IsPass == true) { Alert.ShowInTop("序号为" + devote.Sort + "的人员已经存在于该项目"); } else { Alert.ShowInTop("序号为" + devote.Sort + "的人员正在审核"); } } } else { if (bllStaffDevote.IsNullUserInfoID(Convert.ToInt32(devote.UserInfoID.ToString()), Convert.ToInt32(devote.ProjectID.ToString())).IsPass == true) { Alert.ShowInTop("人员" + UserInfoName.Text + "已存在项目" + DropDownListProjectID.SelectedText); } if (bllStaffDevote.IsNullUserInfoID(Convert.ToInt32(devote.UserInfoID.ToString()), Convert.ToInt32(devote.ProjectID.ToString())).IsPass == false) { Alert.ShowInTop("人员" + UserInfoName.Text + "正在审核"); } } } else { Alert.ShowInTop("序号为1~60"); } } else { Alert.ShowInTop("人员名称不存在"); } } else { Alert.ShowInTop("人员名称不能为空!"); UserInfoName.Text = ""; return; } } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }
//保存 protected void Save_Click(object sender, EventArgs e) { try { if (UserInfoName.Text.Trim() != "") { if (bllUser.IsUser(UserInfoName.Text.Trim()) != null) { if (bllUser.IsUser(UserInfoName.Text.Trim()).IsPass == true) { if (TitleName.Text.Trim() == "") { Alert.ShowInTop("称号名称不能为空!"); TitleName.Text = ""; return; } if (GivDivision.Text.Trim() == "") { Alert.ShowInTop("授予部门不能为空!"); GivDivision.Text = ""; return; } Common.Entities.Honor honor = new Common.Entities.Honor(); honor.UserInfoID = bllUser.FindID(UserInfoName.Text.Trim()); honor.TitleName = TitleName.Text.Trim(); honor.Sort = DropDownListSort.SelectedItem.Text; honor.Remark = Remark.Text.Trim(); honor.GiveTime = DatePickerGiveTime.SelectedDate; honor.GivDivision = GivDivision.Text.Trim(); honor.SecrecyLevel = DropDownListSecrecyLevel.SelectedIndex + 1; honor.EntryPerson = bllHonor.FindEntryPerson(Convert.ToInt32(Session["HonorID"]));// Session["LoginName"].ToString(); if (Convert.ToInt32(Session["SecrecyLevel"]) != 5) { bllHonor.UpdateIsPass(Convert.ToInt32(Session["HonorID"]), false); honor.IsPass = false; bllHonor.InsertForPeople(honor);//插入荣誉称号表 OperationLog operate = new OperationLog(); operate.LoginName = honor.EntryPerson; operate.LoginIP = ""; operate.OperationType = "更新"; operate.OperationContent = "Honor"; operate.OperationDataID = Convert.ToInt32(Session["HonorID"]); operate.OperationTime = System.DateTime.Now; operate.Remark = honor.HonorID.ToString(); bllOperate.Insert(operate);//插入操作表 PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("人员荣誉称号信息已提交审核!")); } else { honor.HonorID = Convert.ToInt32(Session["HonorID"]); honor.IsPass = true; bllHonor.Update(honor);//更新荣誉称号表 PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("人员荣誉称号信息已修改完成!")); } } else { Alert.ShowInTop("该人员正在审核中!"); } } else { Alert.ShowInTop("人员不存在!"); UserInfoName.Text = ""; } } else { Alert.ShowInTop("人员名称不能为空!"); UserInfoName.Text = ""; return; } } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }
//保存 protected void Save_Click(object sender, EventArgs e) { try { if (UserInfoName.Text.Trim() != "") { if (bllUser.IsUser(UserInfoName.Text.Trim()) != null) { if (bllUser.IsUser(UserInfoName.Text.Trim()).IsPass == true) { if (PartTimeUnit.Text.Trim() == "") { Alert.ShowInTop("兼职单位名称不能为空!"); PartTimeUnit.Text = ""; return; } if (PartTimeName.Text.Trim() == "") { Alert.ShowInTop("兼职职位名称不能为空!"); PartTimeName.Text = ""; return; } if (AwardDepartments.Text.Trim() == "") { Alert.ShowInTop("授予部门不能为空!"); AwardDepartments.Text = ""; return; } SocialPartTime social = new SocialPartTime(); social.UserInfoID = bllUser.FindID(UserInfoName.Text.Trim()); social.LevelName = DropDownListLevelName.SelectedItem.Text; social.PartTimeName = PartTimeName.Text.Trim(); social.PartUnitName = PartTimeUnit.Text.Trim(); social.Terms = Terms.Text.Trim(); social.AwardDepartments = AwardDepartments.Text.Trim(); social.ApproveTime = DatePickerApproveTime.SelectedDate; social.Remark = Remark.Text.Trim(); social.SecrecyLevel = DropDownListSecrecyLevel.SelectedIndex + 1; social.primaryUnit = tprimaryUnit.Text.Trim(); social.Sort = ddl_sort.SelectedText.Trim(); social.EntryPerson = bllUser.FindByLoginName(Session["LoginName"].ToString()).UserName; if (Convert.ToInt32(Session["SecrecyLevel"]) != 5) { social.IsPass = false; bllSocial.InsertForPeople(social); //插入社会兼职表 OperationLog operate = new OperationLog(); operate.LoginName = bllUser.FindByLoginName(Session["LoginName"].ToString()).UserName; operate.LoginIP = ""; operate.OperationType = "添加"; operate.OperationContent = "SocialPartTime"; operate.OperationDataID = social.SocialPartTimeID; operate.OperationTime = System.DateTime.Now; operate.Remark = ""; bllOperate.Insert(operate);//插入操作表 PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("人员社会兼职信息已提交审核!")); } else { social.IsPass = true; bllSocial.InsertForPeople(social); //插入社会兼职表 PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("人员社会兼职信息已添加完成!")); } } else { Alert.ShowInTop("该人员正在审核中!"); } } else { Alert.ShowInTop("人员不存在!"); UserInfoName.Text = ""; return; } } else { Alert.ShowInTop("人员名称不能为空!"); UserInfoName.Text = ""; return; } } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }
//保存 protected void Save_Click(object sender, EventArgs e) { try { if (UserInfoName.Text.Trim() != "") { if (bllUser.IsUser(UserInfoName.Text.Trim()) != null) { if (bllUser.IsUser(UserInfoName.Text.Trim()).IsPass == true) { if (EHoldOffice.Text.Trim() == "") { Alert.ShowInTop("教育单位不能为空!"); EHoldOffice.Text = ""; return; } if (Major.Text.Trim() == "") { Alert.ShowInTop("所学专业不能为空!"); Major.Text = ""; return; } EduExperience eduE = new EduExperience(); eduE.UserInfoID = bllUser.FindID(UserInfoName.Text.Trim()); eduE.StartTime = DatePickerStartTime.SelectedDate; if (DatePickerEndTime.SelectedDate.HasValue) { if (DatePickerEndTime.SelectedDate < DatePickerStartTime.SelectedDate) { Alert.ShowInTop("结束时间不能小于开始时间!"); return; } else { eduE.EndTime = DatePickerEndTime.SelectedDate; } } eduE.Remark = Remark.Text.Trim(); eduE.EndTime = DatePickerEndTime.SelectedDate; eduE.Major = Major.Text.Trim(); eduE.EHoldOffice = EHoldOffice.Text.Trim(); eduE.SecrecyLevel = DropDownListSecrecyLevel.SelectedIndex + 1; eduE.EntryPerson = bllEdu.Find(Convert.ToInt32(Session["EduExperienceID"])).EntryPerson; if (Convert.ToInt32(Session["SecrecyLevel"]) != 5) { bllEdu.UpdateIsPass(Convert.ToInt32(Session["EduExperienceID"]), false); eduE.IsPass = false; bllEdu.InsertForPeople(eduE); //插入教育经历表 OperationLog operate = new OperationLog(); operate.LoginName = bllEdu.Find(Convert.ToInt32(Session["EduExperienceID"])).EntryPerson; operate.LoginIP = ""; operate.OperationType = "更新"; operate.OperationContent = "EduExperience"; operate.OperationDataID = Convert.ToInt32(Session["EduExperienceID"]); operate.OperationTime = System.DateTime.Now; operate.Remark = eduE.EduExperienceID.ToString(); bllOperate.Insert(operate);//插入操作表 PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("人员教育经历信息已提交审核!")); } else { eduE.IsPass = true; eduE.EduExperienceID = Convert.ToInt32(Session["EduExperienceID"]); bllEdu.Update(eduE); //更新教育经历表 PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("人员教育经历信息已修改完成!")); } } else { Alert.ShowInTop("该人员尚未通过审核!"); } } else { Alert.ShowInTop("人员不存在!"); UserInfoName.Text = ""; } } else { Alert.ShowInTop("人员名称不能为空!"); UserInfoName.Text = ""; return; } } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }
protected void btn_Save_Click(object sender, EventArgs e) { try { if (tb_MoneyNum.Text.Trim() == "") { Alert.ShowInTop("每项用途所用金额不能为空!"); tb_MoneyNum.Text = ""; return; } Common.Entities.Project project = pro.IsNullProject(tb_SourceWork.Text.Trim()); if (project == null) { tb_SourceWork.Text = ""; Alert.ShowInTop("无此项目,请检查输入!"); return; } else if (project.IsPass == false) { tb_SourceWork.Text = ""; Alert.ShowInTop("此项目正在审核中,请联系管理员!"); return; } int Userid = bluser.FindID(tb_UserInfoID.Text.Trim()); if (Userid == 0) { tb_UserInfoID.Text = ""; Alert.ShowInTop("查无此人,请检查输入!"); return; } else if (Userid == -1) { Alert.ShowInTop("此人员信息正在审核中,请联系管理员!"); return; } double num = 0.0; if (!double.TryParse(tb_MoneyNum.Text.Trim(), out num)) { tb_MoneyNum.Reset(); Alert.ShowInTop("请输入数字!"); return; } if (dp_Time.SelectedDate == null) { Alert.ShowInTop("请选择日期!"); return; } Common.Entities.FundInformation fun = new Common.Entities.FundInformation(); Common.Entities.OperationLog op = new Common.Entities.OperationLog(); fun.UserInfoID = Userid; fun.BudgetDirector = tb_BudgetDirector.Text.Trim(); BLHelper.BLLUser user = new BLHelper.BLLUser(); string username = user.FindByLoginName(Session["LoginName"].ToString()).UserName; fun.EntryPerson = username; fun.EveItemUseMoney = tb_MoneyNum.Text.Trim(); fun.ProjectID = project.ProjectID; fun.OperateType = "提取"; fun.SecrecyLevel = Convert.ToInt32(DropDownListLevel.SelectedValue.ToString()) + 1; fun.Time = dp_Time.SelectedDate; if (Convert.ToInt32(Session["SecrecyLevel"]) == 5) { fun.IsPass = true; fund.Insert(fun); PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("保存成功!")); } else { fun.IsPass = false; fund.Insert(fun); op.LoginIP = " "; op.LoginName = Session["LoginName"].ToString(); op.OperationContent = "FundInformation"; op.OperationDataID = fun.FundInformationID; op.OperationTime = DateTime.Now; op.OperationType = "添加"; blop.Insert(op); PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHidePostBackReference() + Alert.GetShowInTopReference("数据已经提交,请等待管理员确认!")); } } catch (Exception ex) { BLCommon.PublicMethod pm = new BLCommon.PublicMethod(); pm.SaveError(ex, this.Request); } }
//保存 protected void Save_Click(object sender, EventArgs e) { try { if (UserInfoName.Text.Trim() != "") { if (bllUser.IsUser(UserInfoName.Text.Trim()) != null) { if (bllUser.IsUser(UserInfoName.Text.Trim()).IsPass == true) { if (ClassName.Text.Trim() == "") { Alert.ShowInTop("课程名称不能为空!"); ClassName.Text = ""; return; } SpeakClass speak = new SpeakClass(); speak.UserInfoID = bllUser.FindID(UserInfoName.Text.Trim()); speak.ClassName = ClassName.Text.Trim(); speak.Specialty = Specialty.Text.Trim(); speak.TeachingDegree = DropDownListTeachingDegree.SelectedItem.Text; speak.TeachingTime = DatePickerTeachingTime.SelectedDate; speak.Grade = Grade.Text.Trim(); speak.SecrecyLevel = DropDownListSecrecyLevel.SelectedIndex + 1; speak.EntryPerson = bllSpeak.Find(Convert.ToInt32(Session["SpeakClassID"])).EntryPerson; if (Convert.ToInt32(Session["SecrecyLevel"]) != 5) { bllSpeak.UpdateIsPass(Convert.ToInt32(Session["SpeakClassID"]), false); speak.IsPass = false; bllSpeak.InsertForPeople(speak); //插入社会兼职表 OperationLog operate = new OperationLog(); operate.LoginName = bllSpeak.Find(Convert.ToInt32(Session["SpeakClassID"])).EntryPerson; operate.LoginIP = ""; operate.OperationType = "更新"; operate.OperationContent = "SpeakClass"; operate.OperationDataID = Convert.ToInt32(Session["SpeakClassID"]); operate.OperationTime = System.DateTime.Now; operate.Remark = speak.SpeakClassID.ToString(); bllOperate.Insert(operate);//插入操作表 PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("人员主讲课程信息已提交审核!")); } else { speak.IsPass = true; speak.SpeakClassID = Convert.ToInt32(Session["SpeakClassID"]); bllSpeak.Update(speak); //更新社会兼职表 PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("人员主讲课程信息已修改完成!")); } } else { Alert.ShowInTop("该人员正在审核中!"); } } else { Alert.ShowInTop("人员不存在!"); UserInfoName.Text = ""; } } else { Alert.ShowInTop("人员名称不能为空!"); UserInfoName.Text = ""; return; } } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }
//保存 protected void Save_Click(object sender, EventArgs e) { try { //if (UserInfoName.Text.Trim() != "") //{ StaffDevote devote = new StaffDevote(); if (bllUser.IsUser(UserInfoName.Text.Trim()) != null) { devote.UserInfoID = bllUser.FindID(UserInfoName.Text.Trim()); devote.DevoteTime = DatePickerDevoteTime.SelectedDate; //if (DatePickerExitTime.SelectedDate.HasValue) //{ // if (DatePickerExitTime.SelectedDate < DatePickerDevoteTime.SelectedDate) // { // Alert.ShowInTop("退出时间不能小于开始时间!"); // return; // } // else devote.ExitTime = DatePickerExitTime.SelectedDate; //} devote.ProjectID = bllProject.SelectProjectID(DropDownListProjectID.SelectedItem.Text); devote.SecrecyLevel = DropDownListSecrecyLevel.SelectedIndex + 1; devote.Sort = DropDownListSort.SelectedIndex + 1; devote.ProjectCompletion = tb_ProjectCompletion.Text.Trim(); devote.EntryPerson = bllStaffDevote.FindStaffDevoteID(Convert.ToInt32(Session["StaffDevoteID"])).FirstOrDefault().EntryPerson; if (Convert.ToInt32(Session["SecrecyLevel"]) != 5) { devote.IsPass = false; } else { devote.IsPass = true; } //原数据UserID int oldUserID = Convert.ToInt32(bllStaffDevote.FindStaffDevoteID(Convert.ToInt32(Session["StaffDevoteID"])).FirstOrDefault().UserInfoID); //原数据Sort序号 int oldSort = Convert.ToInt32(bllStaffDevote.FindStaffDevoteID(Convert.ToInt32(Session["StaffDevoteID"])).FirstOrDefault().Sort); if (devote.Sort > 0 && devote.Sort <= 60) { //判断人员名称和序号是否与原数据相同 if (devote.UserInfoID == oldUserID && devote.Sort == oldSort) { if (Convert.ToInt32(Session["SecrecyLevel"]) != 5) { bllStaffDevote.ChangePass(Convert.ToInt32(Session["StaffDevoteID"]), false); //改变原人员投入数据的状态 bllStaffDevote.Insert(devote); //插入人员投入表 OperationLog operate = new OperationLog(); operate.LoginName = devote.EntryPerson; operate.OperationType = "更新"; operate.OperationContent = "StaffDevote"; operate.OperationDataID = Convert.ToInt32(Session["StaffDevoteID"]); //原人员投入ID operate.LoginIP = ""; operate.OperationTime = DateTime.Now; operate.Remark = devote.StaffDevoteID.ToString(); bllOperate.Insert(operate); //插入操作日志表 //bllStaffDevote.ChangePass(Convert.ToInt32(Session["StaffDevoteID"]), false);//改变原人员投入数据的状态 PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("您的操作已提交审核,请等待!")); } else { devote.StaffDevoteID = Convert.ToInt32(Session["StaffDevoteID"]); bllStaffDevote.Update(devote); //更新人员投入表 PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("项目人员投入信息修改完成!")); } } else { if (bllStaffDevote.IsNullUserInfoID(Convert.ToInt32(devote.UserInfoID.ToString()), Convert.ToInt32(devote.ProjectID.ToString())) == null) { if (bllStaffDevote.IsNullSort(Convert.ToInt32(devote.ProjectID.ToString()), Convert.ToInt32(devote.Sort)) == null) { //Alert.ShowInTop("人员已存在项目" + DropDownListProjectID.SelectedText); if (Convert.ToInt32(Session["SecrecyLevel"]) != 5) { bllStaffDevote.ChangePass(Convert.ToInt32(Session["StaffDevoteID"]), false); //改变原人员投入数据的状态 bllStaffDevote.Insert(devote); //插入人员投入表 OperationLog operate = new OperationLog(); operate.LoginName = devote.EntryPerson; operate.OperationType = "更新"; operate.OperationContent = "StaffDevote"; operate.OperationDataID = Convert.ToInt32(Session["StaffDevoteID"]); //原人员投入ID operate.LoginIP = ""; operate.OperationTime = DateTime.Now; operate.Remark = devote.StaffDevoteID.ToString(); bllOperate.Insert(operate); //插入操作日志表 //bllStaffDevote.ChangePass(Convert.ToInt32(Session["StaffDevoteID"]), false);//改变原人员投入数据的状态 PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("您的操作已提交审核,请等待!")); } else { devote.StaffDevoteID = Convert.ToInt32(Session["StaffDevoteID"]); bllStaffDevote.Update(devote); //更新人员投入表 PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("项目人员投入信息修改完成!")); } } else { if (bllStaffDevote.IsNullSort(Convert.ToInt32(devote.ProjectID.ToString()), Convert.ToInt32(devote.Sort)).IsPass == true) { Alert.ShowInTop("序号为" + devote.Sort + "的人员已经存在于该项目"); } else { Alert.ShowInTop("序号为" + devote.Sort + "的人员正在审核"); } } } else { if (bllStaffDevote.IsNullUserInfoID(Convert.ToInt32(devote.UserInfoID.ToString()), Convert.ToInt32(devote.ProjectID.ToString())).IsPass == true) { Alert.ShowInTop("人员" + UserInfoName.Text + "已存在项目" + DropDownListProjectID.SelectedText + "中"); } if (bllStaffDevote.IsNullUserInfoID(Convert.ToInt32(devote.UserInfoID.ToString()), Convert.ToInt32(devote.ProjectID.ToString())).IsPass == false) { Alert.ShowInTop("人员" + UserInfoName.Text + "正在审核"); } } } } else { Alert.ShowInTop("序号为1~60"); } } else { Alert.ShowInTop("人员名称不存在"); } //} //else //{ // Alert.ShowInTop("人员名称不能为空!"); // UserInfoName.Text = ""; // return; //} } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }