public void BindData() { int unitLecturesID = Convert.ToInt32(Request.QueryString["id"].ToString()); unitLectures = BLLUL.FindByUnitLecturesID(unitLecturesID); LecturesName.Text = unitLectures.LecturesName; UReportName.Text = unitLectures.UReportName; LecturesPlace.Text = unitLectures.LecturesPlace; DateTime?date = unitLectures.LecturesTime; LecturesTime.Text = date.Value.Year + "-" + date.Value.Month + "-" + date.Value.Day; Agency.Text = BLLAgency.FindAgenName(unitLectures.AgencyID); }
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); } }
//初始化 public void InitData() { try { int id = Convert.ToInt32(Request.QueryString["id"].ToString()); Common.Entities.Achievement caa = ach.FindAll(id); name.Text = caa.AchievementName; agency.Text = agen.FindAgenName(caa.AgencyID); unit.Text = caa.AppraisalUnit; } catch (Exception ex) { pm.SaveError(ex, this.Request); } }
//初始化 public void InitData() { try { int id = Convert.ToInt32(Request.QueryString["id"].ToString()); Common.Entities.UnitInspect uni = un.FindInspectInfo(id, true); name.Text = uni.InspectName; unit.Text = uni.WorkPlace; agency.Text = agen.FindAgenName(uni.AgencyID); } catch (Exception ex) { pm.SaveError(ex, this.Request); } }
//初始化文本框 public void InitText() { if (Session["FurID"] != null) { fur = FutherStudy.FindFurByID(Convert.ToInt32(Session["FurID"])); tName.Text = fur.Name; if (fur.Sex == true) { rbtnBoy.Checked = true; } else { rbtnGril.Checked = true; } tHometown.Text = fur.Hometown; tIDNum.Text = fur.IDNum; tLearnContent.Text = fur.LearnContent; tLearnPlace.Text = fur.LearnPlace; tLearnSchool.Text = fur.LearnSchool; tPhoneNum.Text = fur.PhoneNum; tPintroduce.Text = fur.Profile; tRemark.Text = fur.Remark; tEmail.Text = fur.Email; tDocuType.SelectedValue = fur.DocuType; if (fur.AgencyID != null) { DropDownListAgency.Text = agen.FindAgenName(Convert.ToInt32(fur.AgencyID)); } DroSecrecyLevel.SelectedValue = (fur.SecrecyLevel - 1).ToString(); if (fur.Birthday != null) { dBirthday.SelectedDate = fur.Birthday; } else { dBirthday.SelectedDate = DateTime.Now; } dLearnBeginTime.SelectedDate = fur.LearnBeginTime; if (fur.LearnEndTime != null) { dLearnEndTime.SelectedDate = fur.LearnEndTime; } } else { return; } }
//初始化 public void InitData() { try { int id = Convert.ToInt32(Request.QueryString["id"].ToString()); List <Files> list = file.FindAll(id); Files files = list.FirstOrDefault(); filename.Text = files.FileName; //filesort.Text = file.SelectFileName(Convert.ToInt32(files.DocumentCategoryID)); filesort.Text = files.DocumentCategoryID; agency.Text = agen.FindAgenName(files.AgencyID); } catch (Exception ex) { pm.SaveError(ex, this.Request); } }
//对机构ID转化为机构名称(学术报告中显示的) public string AgencyName(int agency) { try { if (agency != null) { return(BLLAgency.FindAgenName(agency)); } //return agency.AgencyName.ToString(); else { return(" "); } } catch (Exception ex) { BLCommon.PublicMethod pm = new BLCommon.PublicMethod(); pm.SaveError(ex, this.Request); return(""); } }
//初始化文本框数据 public void TextChange() { BLHelper.BLLAgency agen = new BLHelper.BLLAgency(); Common.Entities.Agency ag = new Common.Entities.Agency(); if (Session["AgencyName"].ToString() == "") { return; } ag = agen.FindByName(Session["AgencyName"].ToString()); AgencyName2.Text = Session["AgencyName"].ToString(); if (ag.ParentID != null) { string str = agen.FindAgenName(Convert.ToInt32(ag.ParentID)); if (str != "") { ParentID2.Text = str; } else { ParentID2.Text = " "; } } else { ParentID2.Text = " "; } if (ag.SecrecyLevel != null) { DroSecrecyLevel.SelectedValue = (ag.SecrecyLevel - 1).ToString(); } else { DroSecrecyLevel.Text = " "; } if (ag.AgencyHeads != null) { AgencyHeads2.Text = ag.AgencyHeads.ToString(); } else { AgencyHeads2.Text = " "; } if (ag.Research != null) { Research2.Text = ag.Research.ToString(); } else { Research2.Text = " "; } if (ddl_glo.SelectedText == ag.IsGlobal.Trim()) { ddl_glo.Items[0].Selected = true; } else { ddl_glo.Items[1].Selected = true; } if (ag.FullTimeNumbers != null) { FullTimeNumber2.Text = ag.FullTimeNumbers.ToString(); } else { FullTimeNumber2.Text = " "; } if (ag.PartTimeNumbers != null) { PartTimeNumber2.Text = ag.PartTimeNumbers.ToString(); } else { PartTimeNumber2.Text = " "; } if (ag.Area != null) { Area2.Text = ag.Area.ToString(); } else { Area2.Text = " "; } if (ag.Location != null) { Location2.Text = ag.Location.ToString(); } else { Location2.Text = " "; } }
public void BindData() { try { List <Common.Entities.Project> list = bllProject.FindProject(Convert.ToInt32(Session["ProjectID"]), Convert.ToInt32(Session["SecrecyLevel"])); Common.Entities.Project project = list.FirstOrDefault(); ProjectName2.Text = project.ProjectName; DropDownListAgencyP.SelectedValue = bllAgency.FindAgenName(project.AgencyID); AcceptUnit2.Text = project.AcceptUnit; SourceUnit2.Text = project.SourceUnit; DropDownListProjectSortName.SelectedValue = project.ProjectSortName; if (project.ProjectSortName.Length > 2) { switch (project.ProjectSortName.Substring(0, 2)) { case "一类": DropDownListProjectSortName.Items.Clear(); List <BasicCode> list1 = bllBasicCode.FindALLName("项目等级(一类)"); for (int i = 0; i < list1.Count(); i++) { DropDownListProjectSortName.Items.Add(list1[i].CategoryContent.ToString(), list1[i].CategoryContent.ToString()); } DropDownListProjectSortName.SelectedIndex = 0; break; case "二类": DropDownListProjectSortName.Items.Clear(); List <BasicCode> list2 = bllBasicCode.FindALLName("项目等级(二类)"); for (int i = 0; i < list2.Count(); i++) { DropDownListProjectSortName.Items.Add(list2[i].CategoryContent.ToString(), list2[i].CategoryContent.ToString()); } DropDownListProjectSortName.SelectedIndex = 0; break; case "三类": DropDownListProjectSortName.Items.Clear(); List <BasicCode> list3 = bllBasicCode.FindALLName("项目等级(三类)"); for (int i = 0; i < list3.Count(); i++) { DropDownListProjectSortName.Items.Add(list3[i].CategoryContent.ToString(), list3[i].CategoryContent.ToString()); } DropDownListProjectSortName.SelectedIndex = 0; break; } DropDownListProjectSort.SelectedValue = project.ProjectSortName.Substring(0, 2); } else { DropDownListProjectSort.SelectedValue = ""; } DropDownListState.SelectedValue = project.ProjectState; ApprovedMoney2.Text = project.ApprovedMoney; GetMoney2.Text = project.GetMoney; DropDownListCooperationForms.SelectedValue = project.CooperationForms;// CooperationForms2.Text = project.CooperationForms; DropDownListProjectLevel.SelectedIndex = Convert.ToInt32(project.SecrecyLevel) - 1; ProjectHeads2.Text = project.ProjectHeads; DatePickerStartTime.SelectedDate = project.StartTime; DatePickerEndTime.SelectedDate = project.EndTime; DatePickerExpectEndTime.SelectedDate = project.ExpectEndTime; DropDownListExpecteResults.SelectedValue = project.ExpecteResults;//ExpecteResults2.Text=project.ExpecteResults; GivenMoneyUnits2.Text = project.GivenMoneyUnits; DropDownListNature.SelectedValue = project.ProjectNature; Remark2.Text = project.Remark; ManageMoney.Text = project.ManageMoney.ToString(); PactNum2.Text = project.PactNum; TaskNum2.Text = project.TaskNum; DropDownListSecrecyLevel.SelectedIndex = Convert.ToInt32(project.SecrecyLevel - 1); ProjectManager.Text = project.ProjectManager; //项目负责人(前三) ProjectInNum.Text = project.ProjectInNum; //项目内部编号(科技处) ProjectMember.Text = project.ProjectMember; //项目成员 } catch (Exception ex) { publicmethod.DeleteFile(Convert.ToInt32(aproject.BenefitAttachment), bllAttachment.FindPath(Convert.ToInt32(aproject.BenefitAttachment))); publicmethod.DeleteFile(Convert.ToInt32(aproject.BudgetAttachment), bllAttachment.FindPath(Convert.ToInt32(aproject.BudgetAttachment))); publicmethod.SaveError(ex, this.Request); } }
public void BindData() { try { UserInfo user = bllUser.Find(Convert.ToInt32(Session["UserInfoID"]), true); T_UserName.Text = user.UserName; if (user.Sex == true) { rbtnBoy.Checked = true; } else { rbtnGril.Checked = true; } DropDownListNation.SelectedValue = user.Nation; T_Hometown.Text = user.Hometown; DatePickerBirth.SelectedDate = user.Birth; T_JobTitle.Text = user.JobTitle; DropDownListAgencyP.SelectedValue = bllAgency.FindAgenName(user.AgencyID); T_Telenum.Text = user.TeleNum; T_HomeTetlum.Text = user.HomeNum; T_Officenum.Text = user.OfficeNum; T_DocumentsNum.Text = user.DocumentsNum; DropDownListDocumentsType.SelectedValue = user.DocumentsType; DropDownListPoliticalStatus.SelectedValue = user.PoliticalStatus; ////NewUser.Profile = null; DropDownListEducation.SelectedValue = user.Education; DropDownListDegree.SelectedValue = user.Degree; DropDownListStaffType.SelectedValue = user.StaffType; T_Specilty.Text = user.Specialty; //图片加载 BLHelper.BLLAttachment att = new BLHelper.BLLAttachment(); Image_show.ImageUrl = att.FindPath(user.PhotoID); if (user.Marriage == true) { ISMarriage.Checked = true; } else { NotMarriage.Checked = true; } T_Fax.Text = user.Fax; T_HomeAddress.Text = user.HomeAddress; T_PostalCode.Text = user.PostalCode; T_QQnum.Text = user.qqNum; T_Remark.Text = user.Remark; T_UnitName.Text = user.UnitName; //T_StaffType.Text = user.StaffType; //T_UserInfoBH.Text = user.UserInfoBH; T_LoginName.Text = user.LoginName; T_Email.Text = user.Email; T_Telenum.Text = user.TeleNum; DropDownListAdmin.SelectedValue = user.AdministrativeLevelName; T_Domicile.Text = user.Domicile; DropDownListSubjectSortP.SelectedValue = user.SubjectSortName; DatePickerJobTitleTime.SelectedDate = user.JobTitleTime; TextAreaProfile.Text = user.Profile; DatePickerPoliticalStatusTime.SelectedDate = user.PoliticalStatusTime; if (user.IsDocdorTeacher == true) { IsDoctorTeacher.Checked = true; } else { NotDoctorTeacher.Checked = true; } if (user.IsMasteTeacher == true) { IsMasterTeacher.Checked = true; } else { NotMasterTeacher.Checked = true; } DatePickerMasterTeacherTime.SelectedDate = user.MasterTeacherTime; DatePickerDoctorTeacherTime.SelectedDate = user.DoctorTeacherTime; DropDownListSecrecyLevel.SelectedIndex = Convert.ToInt32(user.SecrecyLevel) - 1; T_Reserch.Text = user.ResearchDirection; LastSchool.Text = user.LastSchool; DatePickerEnterSchoolTime.SelectedDate = user.EnterSchoolTime; //入校时间; DropDownListStudySource.SelectedValue = user.StudySource; //学缘 } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }