private void FillDropDownList(DropDownList ddl)
        {
            //DataTable DTTeam = objCls.GetPriority();
            DataTable DTTeam = objBSS.GetTeamPrioirty();

            foreach (DataRow row in DTTeam.Rows)
            {
                ddl.Items.Add(new ListItem(row["OMPriorityID"].ToString(), row["OMPriorityName"].ToString()));
            }
            ddl.DataBind();
        }
Пример #2
0
        private void LoadMyCombos(string click)
        {
            try
            {
                objBL.loadAssignedDepartment(cmbAssignedDepartment, "Follow");
                objBL.LoadComplainStatus(cmbComplainStatus, "Follow");
                cmbComplainStatus.SelectedValue = "4";


                if (Convert.ToInt32(Session["DeptID"]) == 15 | Convert.ToInt32(Session["DeptID"]) == 1)
                {
                    cmbAssignedDepartment.Enabled = true;
                }



                if (Convert.ToInt32(Session["DepartmentID"]).Equals(1) || Convert.ToInt32(Session["DepartmentID"]).Equals(58) || Convert.ToInt32(Session["DepartmentID"]).Equals(59) || Convert.ToInt32(Session["DepartmentID"]).Equals(60))
                {
                    pnlEscalation.Visible = true;
                    DataTable DTTeam = objBSS.GetTeamList();
                    cmbTeam.DataSource = DTTeam;

                    cmbTeam.DataTextField  = "TeamName";
                    cmbTeam.DataValueField = "TeamID";
                    //cmbTeam.Items.Insert(0, new DropDownList("Please Select", "0"));
                    cmbTeam.DataBind();


                    //DataTable DTPriority = objCls.GetPriority();
                    DataTable DTPriority = objBSS.GetTeamPrioirty();
                    cmbPriority.DataSource     = DTPriority;
                    cmbPriority.DataTextField  = "OMPriorityName";
                    cmbPriority.DataValueField = "OMPriorityID";
                    //cmbPriority.Items.Insert(0, new RadComboBoxItem("Please Select", "0"));
                    cmbPriority.DataBind();
                }
                else
                {
                    cmbTeam.SelectedValue     = "0";
                    cmbPriority.SelectedValue = "0";
                    pnlEscalation.Visible     = false;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        private void FillDropDownList(DropDownList ddl)
        {
            //DataTable DTTeam = objCls.GetPriority();
            DataTable DTTeam = objBSS.GetTeamPrioirty();

            foreach (DataRow row in DTTeam.Rows)
            {
                //arr1.Add(new ListItem(row["TeamName"].ToString(), row["TeamID"].ToString()));
                ddl.Items.Add(new ListItem(row["OMPriorityID"].ToString(), row["OMPriorityName"].ToString()));
            }

            //ArrayList arr = GetDummyData();


            //foreach (ListItem item in arr)
            //{
            //    ddl.Items.Add(item);
            //}
        }