Esempio n. 1
0
        private void BindGroups()
        {
            int ProjectId = -1;

            if (_objectTypeId == (int)ObjectTypes.ToDo)
            {
                using (IDataReader reader = Mediachase.IBN.Business.ToDo.GetToDo(_objectId, false))
                {
                    if (reader.Read())
                    {
                        if (reader["ProjectId"] != DBNull.Value)
                        {
                            ProjectId = (int)reader["ProjectId"];
                        }
                    }
                }
            }
            else if (_objectTypeId == (int)ObjectTypes.Task)
            {
                ProjectId = Task.GetProject(_objectId);
            }

            if (ProjectId > 0)
            {
                int pID = -ProjectId;
                ddGroups.Items.Add(new ListItem(LocRM.GetString("ProjectTeam"), pID.ToString()));
            }
            DataTable dt = SecureGroup.GetListGroupsAsTreeDataTable();

            foreach (DataRow row in dt.Rows)
            {
                ddGroups.Items.Add(new ListItem(CHelper.GetResFileString(row["GroupName"].ToString()), row["GroupId"].ToString()));
            }
        }
Esempio n. 2
0
        private void BindGroups()
        {
            //Groups Binding
            GroupsList.Items.Clear();

            // Any
//			GroupsList.Items.Add(new ListItem(LocRM.GetString("AllFem"), "1"));

            foreach (DataRow row in SecureGroup.GetListGroupsAsTreeDataTable().Rows)
            {
                string   GroupName = CommonHelper.GetResFileString(row["GroupName"].ToString());
                string   GroupId   = row["GroupId"].ToString();
                ListItem item      = new ListItem(GroupName, GroupId);
                GroupsList.Items.Add(item);
            }

            //Saved Value
            GroupsList.ClearSelection();
            try
            {
                GroupsList.SelectedValue = _pc["MV_Group"];
            }
            catch
            {
                GroupsList.SelectedIndex = 0;
                _pc["MV_Group"]          = GroupsList.SelectedValue;
            }

            //Users Binding
            BindUsers(int.Parse(GroupsList.SelectedValue));
        }
Esempio n. 3
0
        private void BindGroups()
        {
            ddGroups.Items.Add(new ListItem(GetGlobalResourceObject("IbnFramework.Common", "FavoritesGroup").ToString(), "0"));

            if (_projectId > 0)
            {
                int pID = -_projectId;
                ddGroups.Items.Add(new ListItem(GetGlobalResourceObject("IbnFramework.Global", "_mc_ProjectTeam").ToString(), pID.ToString()));
            }

            DataTable dt = SecureGroup.GetListGroupsAsTreeDataTable();

            foreach (DataRow row in dt.Rows)
            {
                ddGroups.Items.Add(new ListItem(CHelper.GetResFileString(row["GroupName"].ToString()), row["GroupId"].ToString()));
            }

            if (pc[_projectId + GroupKey] != null)
            {
                CHelper.SafeSelect(ddGroups, pc[_projectId + GroupKey]);
            }

            if (ddGroups.SelectedItem != null)
            {
                BindGroupUsers(int.Parse(ddGroups.SelectedValue));
            }
        }
Esempio n. 4
0
        private void BindGroups()
        {
            ddGroups.Items.Add(new ListItem(GetGlobalResourceObject("IbnFramework.Common", "FavoritesGroup").ToString(), "0"));

            int ProjectId = -1;

            using (IDataReader reader = CalendarEntry.GetEvent(EventID, false))
            {
                if (reader.Read())
                {
                    if (reader["ProjectId"] != DBNull.Value)
                    {
                        ProjectId = (int)reader["ProjectId"];
                    }
                }
            }

            if (ProjectId > 0)
            {
                int pID = -ProjectId;
                ddGroups.Items.Add(new ListItem(LocRM.GetString("ProjectTeam"), pID.ToString()));
            }
            DataTable dt = SecureGroup.GetListGroupsAsTreeDataTable();

            foreach (DataRow row in dt.Rows)
            {
                ddGroups.Items.Add(new ListItem(HttpUtility.HtmlEncode(CommonHelper.GetResFileString(row["GroupName"].ToString())), row["GroupId"].ToString()));
            }

            /*
             *                      using (IDataReader reader = SecureGroup.GetListGroupsAsTree())
             *                      {
             *                              while (reader.Read())
             *                              {
             *                                      string GroupName = CommonHelper.GetResFileString(reader["GroupName"].ToString());
             *                                      string GroupId = reader["GroupId"].ToString();
             *                                      int Level = (int)reader["Level"];
             *                                      for (int i = 1; i < Level; i++)
             *                                              GroupName = "  " + GroupName;
             *                                      ListItem item = new ListItem(GroupName, GroupId);
             *
             *                                      ddGroups.Items.Add(item);
             *                              }
             *                      }
             */

            ListItem li = ddGroups.SelectedItem;

            if (li != null)
            {
                BindGroupUsers(int.Parse(li.Value));
            }
        }
Esempio n. 5
0
        private void BindGroups()
        {
            ddGroups.Items.Add(new ListItem(GetGlobalResourceObject("IbnFramework.Common", "FavoritesGroup").ToString(), "0"));

            DataTable dt = SecureGroup.GetListGroupsAsTreeDataTable();

            foreach (DataRow row in dt.Rows)
            {
                ddGroups.Items.Add(new ListItem(CommonHelper.GetResFileString(row["GroupName"].ToString()), row["GroupId"].ToString()));
            }

            ListItem li = ddGroups.SelectedItem;

            if (li != null)
            {
                BindGroupUsers(int.Parse(li.Value));
            }
        }
Esempio n. 6
0
        private void BindGroups()
        {
            ddGroups.Items.Add(new ListItem(GetGlobalResourceObject("IbnFramework.Common", "FavoritesGroup").ToString(), "0"));

            if (Mediachase.Ibn.Lists.ListManager.GetListInfoByMetaClassName(ClassName).ProjectId.HasValue)
            {
                ddGroups.Items.Add(new ListItem(LocRM.GetString("tProject"), "-1"));
            }

            DataTable dt = SecureGroup.GetListGroupsAsTreeDataTable();

            foreach (DataRow row in dt.Rows)
            {
                ddGroups.Items.Add(new ListItem(CommonHelper.GetResFileString(row["GroupName"].ToString()), row["GroupId"].ToString()));
            }

            ListItem li = ddGroups.SelectedItem;

            if (li != null)
            {
                BindUsers(int.Parse(li.Value));
            }
        }
Esempio n. 7
0
        private void BindGroups()
        {
            ddGroups.Items.Add(new ListItem(GetGlobalResourceObject("IbnFramework.Common", "FavoritesGroup").ToString(), "0"));

            int ProjectId = -1;

            using (IDataReader reader = Document.GetDocument(DocumentID))
            {
                if (reader.Read())
                {
                    if (reader["ProjectId"] != DBNull.Value)
                    {
                        ProjectId = (int)reader["ProjectId"];
                    }
                }
            }

            if (ProjectId > 0)
            {
                int pID = -ProjectId;
                ddGroups.Items.Add(new ListItem(LocRM.GetString("ProjectTeam"), pID.ToString()));
            }
            DataTable dt = SecureGroup.GetListGroupsAsTreeDataTable();

            foreach (DataRow row in dt.Rows)
            {
                ddGroups.Items.Add(new ListItem(CommonHelper.GetResFileString(row["GroupName"].ToString()), row["GroupId"].ToString()));
            }

            ListItem li = ddGroups.SelectedItem;

            if (li != null)
            {
                BindGroupUsers(int.Parse(li.Value));
            }
        }