コード例 #1
0
ファイル: Add_Students.aspx.cs プロジェクト: 15831944/C-12-
 //初始化证件类型下拉框
 public void InitDropDownListDocumentType()
 {
     try
     {
         List <BasicCode> list = bllBasicCode.FindALLName("证件类型");
         for (int i = 0; i < list.Count(); i++)
         {
             DropDownListDocumentType.Items.Add(list[i].CategoryContent.ToString(), list[i].CategoryContent.ToString());
         }
     }
     catch (Exception ex)
     {
         publicmethod.SaveError(ex, this.Request);
     }
 }
コード例 #2
0
 //初始化鉴定级别下拉框
 public void InitDropDownListProjectRank()
 {
     try
     {
         List <BasicCode> list = bllBasicCode.FindALLName("鉴定级别");
         for (int i = 0; i < list.Count(); i++)
         {
             //DropDownListProjectRank.Items.Add(list[i].CategoryContent.ToString(), list[i].CategoryContent.ToString());
         }
     }
     catch (Exception ex)
     {
         pm.SaveError(ex, this.Request);
     }
 }
コード例 #3
0
        //初始化通知公告分类下拉框
        public void InitDropDownListSort()
        {
            List <BasicCode> list = bllBasicCode.FindALLName("通知公告分类名称");

            for (int i = 0; i < list.Count(); i++)
            {
                DropDownList_Sort.Items.Add(list[i].CategoryContent.ToString(), (i + 1).ToString());
            }
        }
コード例 #4
0
        public void EducationBind()
        {
            List <BasicCode> list = bllBasicCode.FindALLName("学历");

            for (int i = 0; i < list.Count(); i++)
            {
                DropDownListTeachingDegree.Items.Add(list[i].CategoryContent.ToString(), list[i].CategoryContent.ToString());
            }
        }
コード例 #5
0
ファイル: MoneyGiveIn.aspx.cs プロジェクト: 15831944/C-12-
        //初始化经费用途分类名称下拉框
        public void Initddl_FundingPurposeSortID()
        {
            List <BasicCode> list = bllBasicCode.FindALLName("经费用途分类名称");

            for (int i = 0; i < list.Count(); i++)
            {
                ddl_FundingPurposeSortID.Items.Add(list[i].CategoryContent.ToString(), (i + 1).ToString());
            }
            ddl_FundingPurposeSortID.Items[0].Selected = true;
        }
コード例 #6
0
ファイル: PartTimeJob.aspx.cs プロジェクト: 15831944/C-12-
        //搜索框变化
        protected void DropDownListFind_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch (DropDownListFind.SelectedItem.Text)
            {
            case "全部":
                TBNameandAgency.Text = "";
                DropDownListYearandLevel.Items.Clear();
                DropDownListYearandLevel.Enabled = false;
                TBNameandAgency.Enabled          = false;
                break;

            case "人员姓名":
                TBNameandAgency.Text = "";
                DropDownListYearandLevel.Items.Clear();
                DropDownListYearandLevel.Enabled = false;
                TBNameandAgency.Enabled          = true;
                break;

            case "时间":
                TBNameandAgency.Text = "";
                DropDownListYearandLevel.Items.Clear();
                for (int i = 1960; i <= 2060; i++)
                {
                    DropDownListYearandLevel.Items.Add(i.ToString(), i.ToString());
                }
                DropDownListYearandLevel.EnableEdit = false;
                DropDownListYearandLevel.Enabled    = true;
                TBNameandAgency.Enabled             = false;
                break;

            case "授予部门":
                TBNameandAgency.Text = "";
                DropDownListYearandLevel.Items.Clear();
                DropDownListYearandLevel.Enabled = false;
                TBNameandAgency.Enabled          = true;
                break;

            case "级别名称":
                TBNameandAgency.Text = "";
                DropDownListYearandLevel.Items.Clear();
                List <BasicCode> list = bllBasicCode.FindALLName("级别");
                for (int i = 0; i < list.Count(); i++)
                {
                    DropDownListYearandLevel.Items.Add(list[i].CategoryContent.ToString(), list[i].CategoryContent.ToString());
                }
                DropDownListYearandLevel.EnableEdit = false;
                DropDownListYearandLevel.Enabled    = true;
                TBNameandAgency.Enabled             = false;
                break;
            }
        }
コード例 #7
0
 //初始化文件下拉框
 public void InitDroplistFile()
 {
     try
     {
         List <BasicCode> list = bllBasicCode.FindALLName("文件分类名称");
         for (int i = 0; i < list.Count(); i++)
         {
             DropDownListFile.Items.Add(list[i].CategoryContent.ToString(), (i + 1).ToString());
         }
     }
     catch (Exception ex)
     {
         pm.SaveError(ex, this.Request);
     }
 }
コード例 #8
0
ファイル: WorkAdd.aspx.cs プロジェクト: 15831944/C-12-
        //初始化下拉框
        public void InitDroplist()
        {
            string[] SecrecyLevels = new string[] { "四级", "三级", "二级", "一级", "管理员" };
            for (int i = 0; i < Convert.ToInt32(Session["SecrecyLevel"]); i++)
            {
                DroSecrecyLevel.Items.Add(SecrecyLevels[i].ToString(), i.ToString());
            }
            //初始化机构分类名称下拉框
            List <BasicCode> list = bllBasicCode.FindALLName("机构分类名称");

            for (int i = 0; i < list.Count(); i++)
            {
                DroAgencyNumber.Items.Add(list[i].CategoryContent.ToString(), (i + 1).ToString());
            }
        }
コード例 #9
0
ファイル: AddMeeting.aspx.cs プロジェクト: 15831944/C-12-
 //初始化会议分类下拉框
 public void InitDropDownListSort()
 {
     try
     {
         List <BasicCode> list = bllBasicCode.FindALLName("会议分类名称");
         for (int i = 0; i < list.Count(); i++)
         {
             DropDownList_MeetingSort.Items.Add(list[i].CategoryContent.ToString(), (i + 1).ToString());
         }
     }
     catch (Exception ex)
     {
         BLCommon.PublicMethod pm = new BLCommon.PublicMethod();
         pm.SaveError(ex, this.Request);
         return;
     }
 }
コード例 #10
0
        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);
            }
        }
コード例 #11
0
ファイル: Students.aspx.cs プロジェクト: 15831944/C-12-
 //搜索框变化
 protected void DropDownStudentType_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DropDownStudentType.SelectedItem.Text == "在读" || DropDownStudentType.SelectedItem.Text == "毕业")
     {
         TriggerBox.Text      = "";
         TriggerBox.Enabled   = true;
         DropDownList.Enabled = true;
         DropDownList.Items.Clear();
         StudentType();
         DropDownList.EnableEdit = false;
     }
     else if (DropDownStudentType.SelectedItem.Text == "全部")
     {
         TriggerBox.Enabled      = false;
         DropDownList.Enabled    = false;
         DropDownList.EnableEdit = false;
     }
     else if (DropDownStudentType.SelectedItem.Text == "所属部门")
     {
         TriggerBox.Enabled   = false;
         DropDownList.Enabled = true;
         DropDownList.Items.Clear();
         DropDownList.EnableEdit = false;
         try
         {
             List <Common.Entities.Agency> list = BLLAgency.FindAll(Convert.ToInt32(Session["SecrecyLevel"]));
             for (int i = 0; i < list.Count(); i++)
             {
                 DropDownList.Items.Add(list[i].AgencyName.ToString(), (i + 1).ToString());
             }
         }
         catch (Exception ex)
         {
             publicmethod.SaveError(ex, this.Request);
         }
     }
     else if (DropDownStudentType.SelectedItem.Text == "学生类型")
     {
         TriggerBox.Enabled   = false;
         DropDownList.Enabled = true;
         DropDownList.Items.Clear();
         DropDownList.EnableEdit = false;
         try
         {
             List <BasicCode> list = bllBasicCode.FindALLName("学生类型");
             for (int i = 0; i < list.Count(); i++)
             {
                 DropDownList.Items.Add(list[i].CategoryContent.ToString(), list[i].CategoryContent.ToString());
             }
         }
         catch (Exception ex)
         {
             publicmethod.SaveError(ex, this.Request);
         }
     }
     else
     {
         TriggerBox.Enabled      = true;
         DropDownList.Enabled    = false;
         DropDownList.EnableEdit = false;
     }
 }