Exemple #1
0
        private void BindDropDownList()
        {
            try
            {
                PmsSysBiz      pmsSysBiz  = new PmsSysBiz();
                IList <PmsSys> pmsSysList = pmsSysBiz.SelectData1Data2ByType("PM", "RequirementPeriod");

                IList <string> listYearMonth = pmsSysList.Select(t => t.Data1).Distinct().ToList();
                DropDownListYearMonth.DataSource = listYearMonth;
                DropDownListYearMonth.DataBind();

                DropDownListYearMonth.Items.Insert(0, new ListItem());
                DropDownListYearMonth.Items[0].Text  = "";
                DropDownListYearMonth.Items[0].Value = "";

                DropDownListWeekPeriod.DataSource     = pmsSysList;
                DropDownListWeekPeriod.DataTextField  = "data2";
                DropDownListWeekPeriod.DataValueField = "data2";
                DropDownListWeekPeriod.DataBind();

                DropDownListWeekPeriod.Items.Insert(0, new ListItem());
                DropDownListWeekPeriod.Items[0].Text  = "";
                DropDownListWeekPeriod.Items[0].Value = "";
            }
            catch
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), "alert('Bind Domain failure');", true);
                this.DropDownListYearMonth.Focus();
            }
        }
Exemple #2
0
        protected Hashtable FileExtensionExportFormat()
        {
            PmsSysBiz      pmsSysBiz             = new PmsSysBiz();
            IList <PmsSys> listPmsSys            = pmsSysBiz.SelectData1Data2ByType("PM", "AttachmentType");
            Hashtable      hashTableContentTypes = new Hashtable();

            foreach (PmsSys pmsSys in listPmsSys)
            {
                hashTableContentTypes.Add(pmsSys.Data1, pmsSys.Data2);
            }
            return(hashTableContentTypes);
        }
Exemple #3
0
        private void BindDropDownList(GridViewRow row)
        {
            DropDownList dropDownListStatus = (DropDownList)row.FindControl("DropDownListStatus");

            if (dropDownListStatus != null)
            {
                PmsSysBiz      pmsSysBiz  = new PmsSysBiz();
                IList <PmsSys> pmsSysList = pmsSysBiz.SelectData1Data2ByType("PM", "RequirementStatus");

                dropDownListStatus.DataSource     = pmsSysList;
                dropDownListStatus.DataTextField  = "data1";
                dropDownListStatus.DataValueField = "data1";
                dropDownListStatus.DataBind();
            }
        }
Exemple #4
0
        private void BindDropDownListProgramLanguage()
        {
            PmsSysBiz pmsSysBiz = new PmsSysBiz();

            try
            {
                IList <PmsSys> pmsSysList = pmsSysBiz.SelectData1Data2ByType("PM", "ProgramLanguage");
                this.DropDownListProgramLanguage.DataSource     = pmsSysList;
                this.DropDownListProgramLanguage.DataTextField  = "Data2";
                this.DropDownListProgramLanguage.DataValueField = "Data1";
                this.DropDownListProgramLanguage.DataBind();
            }
            catch
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), "alert('Bind ProgramLanguage failure');", true);
                this.DropDownListProgramLanguage.Focus();
            }
        }
Exemple #5
0
        private void BindDropDownListTaskComplexity()
        {
            PmsSysBiz pmsSysBiz = new PmsSysBiz();

            try
            {
                IList <PmsSys> pmsSysList = pmsSysBiz.SelectData1Data2ByType("PM", "TaskComplexity");
                this.DropDownListTaskComplexity.DataSource     = pmsSysList;
                this.DropDownListTaskComplexity.DataTextField  = "Data2";
                this.DropDownListTaskComplexity.DataValueField = "Data1";
                this.DropDownListTaskComplexity.DataBind();

                this.DropDownListTaskComplexity.Items.Insert(0, new ListItem());
                this.DropDownListTaskComplexity.Items[0].Text  = "";
                this.DropDownListTaskComplexity.Items[0].Value = "";
            }
            catch
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), "alert('Bind TaskComplexity failure');", true);
                this.DropDownListTaskComplexity.Focus();
            }
        }