Ejemplo n.º 1
0
        public static void LoadDropDownList(FineUI.DropDownList prmDropDownList, string prmDataTextField = null, string prmDataValueField = null, object prmDataSource = null, DropDownListAction?prmDropDownListAction = null)
        {
            prmDropDownList.Items.Clear();
            FineUI.ListItem firstItem = null;
            if (prmDropDownListAction != null)
            {
                //prmDropDownList. AppendDataBoundItems = true;

                switch (prmDropDownListAction)
                {
                case DropDownListAction.All:
                    firstItem = new FineUI.ListItem(Constants.All, Constants.AllValue);
                    break;

                case DropDownListAction.Select:
                    firstItem = new FineUI.ListItem(Constants.Select, Constants.SelectValue);
                    break;
                }
            }

            if (prmDataSource != null)
            {
                prmDropDownList.DataTextField  = prmDataTextField;
                prmDropDownList.DataValueField = prmDataValueField;
                prmDropDownList.DataSource     = prmDataSource;
            }

            prmDropDownList.DataBind();

            if (firstItem != null)
            {
                firstItem.Selected = true;
                prmDropDownList.Items.Insert(0, firstItem);
            }
        }
Ejemplo n.º 2
0
        protected void Page_Init(object sender, EventArgs e)
        {
            List <Entity.Waste> items = DAL.Waste.GetPartWasteEx(2);

            //this.ddlGrade.DataSource = grade;
            //this.ddlGrade.DataTextField = "Name";
            //this.ddlGrade.DataValueField = "ID";
            //this.ddlGrade.DataBind();
            for (int i = 0; i < items.Count; i++)
            {
                FineUI.ListItem li   = new FineUI.ListItem();
                Entity.Waste    item = items[i];
                li.Text  = item.WasteName;
                li.Value = item.WasteName;
                this.drop_Product.Items.Insert(i, li);
            }


            //List<Entity.Waste> items2 = DAL.Waste.GetPartWasteEx(3);
            //for (int i = 0; i < items2.Count; i++)
            //{
            //    FineUI.ListItem li = new FineUI.ListItem();
            //    Entity.Waste item = items2[i];
            //    li.Text = item.WasteName;
            //    li.Value = item.WasteName;
            //    this.drop_NewWaste.Items.Insert(i, li);
            //}

            //List<Entity.Pond> items3 = DAL.Pond.GetAllPondEx();
            List <Entity.Pond> items3 = DAL.Pond.GetAllPondEx2(2);

            for (int i = 0; i < items3.Count; i++)
            {
                FineUI.ListItem li   = new FineUI.ListItem();
                Entity.Pond     item = items3[i];
                li.Text  = item.Name;
                li.Value = item.Name;
                this.drop_Pond2.Items.Insert(i, li);
            }

            //DataTable table2 = DAL.Pond.GetAllPond();
            DataTable table2 = DAL.Pond.GetPartPond(1);

            drop_Pond.DataSource     = table2;
            drop_Pond.DataTextField  = "Name";
            drop_Pond.DataValueField = "PondID";
            drop_Pond.DataBind();
        }
Ejemplo n.º 3
0
    private void LoadData()
    {
        List <FineOffice.Modules.OA_FlowSort> sortList = sortBll.GetListAll();

        ddlSort.Items.Clear();
        FineUI.ListItem li = new FineUI.ListItem();
        li.Text = "<请选择>";
        ddlSort.Items.Add(li);
        foreach (FineOffice.Modules.OA_FlowSort sort in sortList)
        {
            FineUI.ListItem item = new FineUI.ListItem();
            item.Text  = sort.FlowSortName;
            item.Value = sort.ID.ToString();
            ddlSort.Items.Add(item);
        }
    }
Ejemplo n.º 4
0
    private void LoadData()
    {
        List <FineOffice.Modules.OA_FormType> typeList = typeBll.GetListAll();

        ddlType.Items.Clear();
        FineUI.ListItem li = new FineUI.ListItem();
        li.Text = "<请选择>";
        ddlType.Items.Add(li);
        foreach (FineOffice.Modules.OA_FormType type in typeList)
        {
            FineUI.ListItem item = new FineUI.ListItem();
            item.Text  = type.FormTypeName;
            item.Value = type.ID.ToString();
            ddlType.Items.Add(item);
        }
    }
Ejemplo n.º 5
0
        protected void Page_Init(object sender, EventArgs e)
        {
            List <Entity.Waste> items2 = DAL.Waste.GetPartWasteEx(3);

            for (int i = 0; i < items2.Count; i++)
            {
                FineUI.ListItem li   = new FineUI.ListItem();
                Entity.Waste    item = items2[i];
                li.Text  = item.WasteName;
                li.Value = item.WasteName;
                this.drop_NewWaste.Items.Insert(i, li);
            }


            //DataTable table2 = DAL.Pond.GetAllPond();
        }
Ejemplo n.º 6
0
        protected void Page_Init(object sender, EventArgs e)
        {
            List <Entity.AnalysisItem> items = DAL.AnalysisItem.GetAnalysisItemList(1);

            //this.ddlGrade.DataSource = grade;
            //this.ddlGrade.DataTextField = "Name";
            //this.ddlGrade.DataValueField = "ID";
            //this.ddlGrade.DataBind();
            for (int i = 0; i < items.Count; i++)
            {
                FineUI.ListItem     li   = new FineUI.ListItem();
                Entity.AnalysisItem item = items[i];
                li.Text  = item.ItemName;
                li.Value = item.ItemName;
                this.drop_Item.Items.Insert(i, li);
            }
        }
Ejemplo n.º 7
0
    private void LoadData()
    {
        List <FineOffice.Modules.HR_Department> list = departmentBll.GetListAll();

        ddlDepartment.Items.Clear();
        FineUI.ListItem li = new FineUI.ListItem();
        li.Value = "";
        li.Text  = "<全部>";
        ddlDepartment.Items.Add(li);
        foreach (FineOffice.Modules.HR_Department department in list)
        {
            FineUI.ListItem item = new FineUI.ListItem();
            item.Text  = department.DepartmentName;
            item.Value = department.ID.ToString();
            ddlDepartment.Items.Add(item);
        }
    }
Ejemplo n.º 8
0
    private void LoadData()
    {
        List <FineOffice.Modules.HR_Department> deparmentList = depBll.GetListAll();

        ddlDepartment.Items.Clear();
        FineUI.ListItem li = new FineUI.ListItem();
        li.Text = "<请选择>";
        ddlDepartment.Items.Add(li);
        foreach (FineOffice.Modules.HR_Department department in deparmentList)
        {
            FineUI.ListItem item = new FineUI.ListItem();
            item.Text  = department.DepartmentName;
            item.Value = department.ID.ToString();
            ddlDepartment.Items.Add(item);
        }

        List <FineOffice.Modules.HR_Job> jobList = jobBll.GetListAll();

        ddlJob.Items.Clear();
        FineUI.ListItem jobLi = new FineUI.ListItem();
        jobLi.Text = "<请选择>";
        ddlJob.Items.Add(jobLi);
        foreach (FineOffice.Modules.HR_Job job in jobList)
        {
            FineUI.ListItem item = new FineUI.ListItem();
            item.Text  = job.Job;
            item.Value = job.ID.ToString();
            ddlJob.Items.Add(item);
        }

        List <FineOffice.Modules.AM_Kind> eduList = kindBll.GetList(d => d.KindID == 1);

        ddlEducation.Items.Clear();
        FineUI.ListItem eduLi = new FineUI.ListItem();
        eduLi.Text = "<请选择>";
        ddlEducation.Items.Add(eduLi);
        foreach (FineOffice.Modules.AM_Kind kind in eduList)
        {
            FineUI.ListItem item = new FineUI.ListItem();
            item.Text  = kind.Name;
            item.Value = kind.ID.ToString();
            ddlEducation.Items.Add(item);
        }
    }
Ejemplo n.º 9
0
        //日期下拉框数据绑定
        public void bind()
        {
            int year  = DateTime.Now.Year;
            int year2 = DateTime.Now.Year + 1;

            if (DateTime.Now.Month < 9)
            {
                List <string> list = new List <string>();

                for (int i = 1; i < 5; i++)
                {
                    string y1 = (--year).ToString();
                    string y2 = (--year2).ToString();

                    FineUI.ListItem li = new FineUI.ListItem();
                    li.Text = li.Value = (y1).ToString() + "-" + (y2).ToString() + "-1";
                    DL1.Items.Add(li);

                    li      = new FineUI.ListItem();
                    li.Text = li.Value = (y1).ToString() + "-" + (y2).ToString() + "-2";
                    DL1.Items.Add(li);
                }
            }
            else
            {
                List <string> list = new List <string>();

                for (int i = 1; i < 5; i++)
                {
                    string y1 = (year--).ToString();
                    string y2 = (year2--).ToString();

                    FineUI.ListItem li = new FineUI.ListItem();
                    li.Text = li.Value = (y1).ToString() + "-" + (y2).ToString() + "-1";
                    DL1.Items.Add(li);

                    li      = new FineUI.ListItem();
                    li.Text = li.Value = (y1).ToString() + "-" + (y2).ToString() + "-2";
                    DL1.Items.Add(li);
                }
            }
            DL1.SelectedIndex = 0;
        }
Ejemplo n.º 10
0
    private void LoadData()
    {
        List <FineOffice.Modules.HR_Department> list = departmentBll.GetListAll();

        ddlDepartment.Items.Clear();
        FineUI.ListItem li = new FineUI.ListItem();
        li.Value = "";
        li.Text  = "<全部>";
        ddlDepartment.Items.Add(li);
        foreach (FineOffice.Modules.HR_Department department in list)
        {
            FineUI.ListItem item = new FineUI.ListItem();
            item.Text  = department.DepartmentName;
            item.Value = department.ID.ToString();
            ddlDepartment.Items.Add(item);
        }
        FineOffice.Modules.OA_FlowProcess model = processBll.GetModel(p => p.ID == Request["Process"]);
        hiddenDepartment.Text = model.ProcessDepartment;
        hiddenPerson.Text     = model.ProcessPersonnel;
    }
Ejemplo n.º 11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string ProcessID = Request["ProcessID"];
         hiddenRunProcess.Text = Request["RunProcess"];
         List <FineOffice.Modules.OA_FlowForm> formList = flowFormBll.GetList(f => f.ProcessID == ProcessID);
         ddlForm.Items.Clear();
         FineUI.ListItem li = new FineUI.ListItem();
         li.Text = "<空白表单>";
         ddlForm.Items.Add(li);
         foreach (FineOffice.Modules.OA_FlowForm form in formList)
         {
             FineUI.ListItem item = new FineUI.ListItem();
             item.Text  = form.FormName;
             item.Value = form.FormID.ToString();
             ddlForm.Items.Add(item);
         }
         btnClose.OnClientClick = ActiveWindow.GetConfirmHidePostBackReference();
     }
 }
Ejemplo n.º 12
0
        //学期绑定到两个下拉框
        public void BindDDL()
        {
            #region 添加活动的日期下拉框
            int year  = DateTime.Now.Year;
            int year2 = DateTime.Now.Year + 1;
            if (DateTime.Now.Month < 9)
            {
                for (int i = 1; i < 5; i++)
                {
                    ListItem li = new ListItem();
                    li.Text = li.Value = (--year).ToString() + "-" + (--year2).ToString();
                    selectSy.Items.Add(li);
                }
            }
            else
            {
                for (int i = 1; i < 5; i++)
                {
                    ListItem li = new ListItem();
                    li.Text = li.Value = (year--).ToString() + "-" + (year2--).ToString();
                    selectSy.Items.Add(li);
                }
            }

            List <string> list2 = new List <string>();
            list2.Add("1");
            list2.Add("2");
            selectSe.DataSource = list2;
            selectSe.DataBind();
            #endregion

            #region 查询活动的日期下拉框
            //学期绑定。九月为分界
            year  = DateTime.Now.Year;
            year2 = DateTime.Now.Year + 1;
            if (DateTime.Now.Month < 9)
            {
                List <string> list = new List <string>();

                for (int i = 1; i < 5; i++)
                {
                    string y1 = (--year).ToString();
                    string y2 = (--year2).ToString();

                    FineUI.ListItem li = new FineUI.ListItem();
                    li.Text = li.Value = (y1).ToString() + "-" + (y2).ToString() + "-1";
                    DDL.Items.Add(li);

                    li      = new FineUI.ListItem();
                    li.Text = li.Value = (y1).ToString() + "-" + (y2).ToString() + "-2";
                    DDL.Items.Add(li);
                }
            }
            else
            {
                List <string> list = new List <string>();

                for (int i = 1; i < 5; i++)
                {
                    string y1 = (year--).ToString();
                    string y2 = (year2--).ToString();

                    FineUI.ListItem li = new FineUI.ListItem();
                    li.Text = li.Value = (y1).ToString() + "-" + (y2).ToString() + "-1";
                    DDL.Items.Add(li);

                    li      = new FineUI.ListItem();
                    li.Text = li.Value = (y1).ToString() + "-" + (y2).ToString() + "-2";
                    DDL.Items.Add(li);
                }
            }

            #endregion
        }
Ejemplo n.º 13
0
        //年级下拉框绑定
        protected void GradeBind()
        {
            int year = DateTime.Now.Year;

            if (DateTime.Now.Month < 9)
            {
                List <string> list = new List <string>();

                for (int i = 1; i < 5; i++)
                {
                    FineUI.ListItem li = new FineUI.ListItem();
                    li.Text = li.Value = (--year).ToString();
                    SelectGrade.Items.Add(li);
                }
            }
            else
            {
                List <string> list = new List <string>();

                for (int i = 1; i < 5; i++)
                {
                    FineUI.ListItem li = new FineUI.ListItem();
                    li.Text = li.Value = (year--).ToString();
                    SelectGrade.Items.Add(li);
                }
            }

            //学期绑定。九月为分界
            year = DateTime.Now.Year;
            int year2 = DateTime.Now.Year + 1;

            if (DateTime.Now.Month < 9)
            {
                List <string> list = new List <string>();

                for (int i = 1; i < 5; i++)
                {
                    string y1 = (--year).ToString();
                    string y2 = (--year2).ToString();

                    FineUI.ListItem li = new FineUI.ListItem();
                    li.Text = li.Value = (y1).ToString() + "-" + (y2).ToString() + "-1";
                    DL3.Items.Add(li);

                    li      = new FineUI.ListItem();
                    li.Text = li.Value = (y1).ToString() + "-" + (y2).ToString() + "-2";
                    DL3.Items.Add(li);
                }
            }
            else
            {
                List <string> list = new List <string>();

                for (int i = 1; i < 5; i++)
                {
                    string y1 = (year--).ToString();
                    string y2 = (year2--).ToString();

                    FineUI.ListItem li = new FineUI.ListItem();
                    li.Text = li.Value = (y1).ToString() + "-" + (y2).ToString() + "-1";
                    DL3.Items.Add(li);

                    li      = new FineUI.ListItem();
                    li.Text = li.Value = (y1).ToString() + "-" + (y2).ToString() + "-2";
                    DL3.Items.Add(li);
                }
            }
        }
Ejemplo n.º 14
0
        private void LoadData()
        {
            btnClose.OnClientClick = ActiveWindow.GetHideReference();

            string id = Request.QueryString["id"].Trim();

            if (id != null)
            {
                int messageID = int.Parse(id);

                List <T_Message> message = messageBLL.GetMessageById(messageID);
                txb_NickName.Text = message[0].NickName;
                txb_Sex.Text      = message[0].Sex;

                txa_BriefQuestion.Text  = message[0].BriefQuestion;
                txa_DetailQuestion.Text = message[0].DetailQuestion;
                HtmlEditor1.Text        = message[0].Reply;

                #region dropdownlist status 的一些操作

                ddl_Status.DataTextField  = "StatusText";
                ddl_Status.DataValueField = "StatusValue";

                DataTable dt = new DataTable();
                dt.Columns.Add("StatusText", typeof(string));
                dt.Columns.Add("StatusValue", typeof(int));

                DataRow dr = dt.NewRow();
                dr["StatusText"]  = "不同意展示";
                dr["StatusValue"] = 0;
                dt.Rows.Add(dr);
                DataRow dr2 = dt.NewRow();
                dr2["StatusText"]  = "未纳入精选";
                dr2["StatusValue"] = 1;
                dt.Rows.Add(dr2);
                DataRow dr3 = dt.NewRow();
                dr3["StatusText"]  = "已纳入精选";
                dr3["StatusValue"] = 2;
                dt.Rows.Add(dr3);

                ddl_Status.DataSource = dt;

                ddl_Status.DataBind();

                if (message[0].Status == 0)
                {
                    FineUI.ListItem item = ddl_Status.Items.FindByValue("0");
                    if (item != null)
                    {
                        ddl_Status.Items.FindByValue("0").Selected = true;
                    }
                    ddl_Status.Enabled = false;
                }
                else if (message[0].Status == 1)
                {
                    FineUI.ListItem item = ddl_Status.Items.FindByValue("1");
                    if (item != null)
                    {
                        ddl_Status.Items.FindByValue("1").Selected = true;
                    }

                    // 不同意展示的选项设置为不可选
                    FineUI.ListItem item0 = ddl_Status.Items.FindByValue("0");
                    if (item != null)
                    {
                        ddl_Status.Items.FindByValue("0").EnableSelect = false;
                    }

                    // ddl_Status.Text = "未纳入精选";
                }
                else if (message[0].Status == 2)
                {
                    FineUI.ListItem item = ddl_Status.Items.FindByValue("2");
                    if (item != null)
                    {
                        ddl_Status.Items.FindByValue("2").Selected = true;
                    }

                    // 不同意展示的选项设置为不可选
                    FineUI.ListItem item0 = ddl_Status.Items.FindByValue("0");
                    if (item != null)
                    {
                        ddl_Status.Items.FindByValue("0").EnableSelect = false;
                    }

                    // ddl_Status.Text = "已纳入精选";
                }

                //ddl_Status.DataBind();

                #endregion

                #region ddl_Category 的一些操作

                ddl_Categpry.DataTextField  = "CategoryName";
                ddl_Categpry.DataValueField = "CategoryValue";

                DataTable dtCategory = new DataTable();
                dtCategory.Columns.Add("CategoryName", typeof(string));
                dtCategory.Columns.Add("CategoryValue", typeof(int));

                DataRow drCategory0 = dtCategory.NewRow();
                drCategory0["CategoryName"]  = "--请选择--";
                drCategory0["CategoryValue"] = "0";
                dtCategory.Rows.Add(drCategory0);
                DataRow drCategory1 = dtCategory.NewRow();
                drCategory1["CategoryName"]  = "个人发展";
                drCategory1["CategoryValue"] = "1";
                dtCategory.Rows.Add(drCategory1);
                DataRow drCategory2 = dtCategory.NewRow();
                drCategory2["CategoryName"]  = "恋爱";
                drCategory2["CategoryValue"] = "2";
                dtCategory.Rows.Add(drCategory2);
                DataRow drCategory3 = dtCategory.NewRow();
                drCategory3["CategoryName"]  = "情绪";
                drCategory3["CategoryValue"] = "3";
                dtCategory.Rows.Add(drCategory3);
                DataRow drCategory4 = dtCategory.NewRow();
                drCategory4["CategoryName"]  = "人际";
                drCategory4["CategoryValue"] = "4";
                dtCategory.Rows.Add(drCategory4);
                DataRow drCategory5 = dtCategory.NewRow();
                drCategory5["CategoryName"]  = "神经质";
                drCategory5["CategoryValue"] = "5";
                dtCategory.Rows.Add(drCategory5);
                DataRow drCategory6 = dtCategory.NewRow();
                drCategory6["CategoryName"]  = "适应";
                drCategory6["CategoryValue"] = "6";
                dtCategory.Rows.Add(drCategory6);
                DataRow drCategory7 = dtCategory.NewRow();
                drCategory7["CategoryName"]  = "学习";
                drCategory7["CategoryValue"] = "7";
                dtCategory.Rows.Add(drCategory7);
                DataRow drCategory8 = dtCategory.NewRow();
                drCategory8["CategoryName"]  = "人格";
                drCategory8["CategoryValue"] = "8";
                dtCategory.Rows.Add(drCategory8);
                DataRow drCategory9 = dtCategory.NewRow();
                drCategory9["CategoryName"]  = "自我";
                drCategory9["CategoryValue"] = "9";
                dtCategory.Rows.Add(drCategory9);
                DataRow drCategory10 = dtCategory.NewRow();
                drCategory10["CategoryName"]  = "其他";
                drCategory10["CategoryValue"] = "10";
                dtCategory.Rows.Add(drCategory10);

                ddl_Categpry.DataSource = dtCategory;
                ddl_Categpry.DataBind();

                // 选中该纪录对应的Category
                switch (message[0].Category)
                {
                case 0: ddl_Categpry.Items.FindByValue("0").Selected = true; break;

                case 1: ddl_Categpry.Items.FindByValue("1").Selected = true; break;

                case 2: ddl_Categpry.Items.FindByValue("2").Selected = true; break;

                case 3: ddl_Categpry.Items.FindByValue("3").Selected = true; break;

                case 4: ddl_Categpry.Items.FindByValue("4").Selected = true; break;

                case 5: ddl_Categpry.Items.FindByValue("5").Selected = true; break;

                case 6: ddl_Categpry.Items.FindByValue("6").Selected = true; break;

                case 7: ddl_Categpry.Items.FindByValue("7").Selected = true; break;

                case 8: ddl_Categpry.Items.FindByValue("8").Selected = true; break;

                case 9: ddl_Categpry.Items.FindByValue("9").Selected = true; break;
                }

                #endregion

                txb_NickName.Enabled = false;

                txb_Sex.Enabled = false;
            }

            else
            {
                Alert alert = new Alert();
                alert.Message = "出错啦 请稍后再试";
                alert.Target  = Target.Top;
                alert.Show();
            }
        }