コード例 #1
0
        public static void LoadForCurItemChuaDuocGiao(ListItemCollection lstItems, ListItem curItem, int idTrungTam, int idPhongBan, int idDotDanhGia)
        {
            int curId = ConvertUtility.ToInt32(curItem.Value);
            int level = ConvertUtility.ToInt32(curItem.Attributes["Level"]);

            level++;
            DataTable dtChildZones = GetAllByParentID(curId, idTrungTam, idPhongBan);

            if (dtChildZones == null)
            {
                return;
            }
            foreach (DataRow row in dtChildZones.Rows)
            {
                DataTable dt = DotDanhGiaController.GetAllNhanVienTheoCongViec(ConvertUtility.ToInt32(row["ID"].ToString()), idDotDanhGia);
                ListItem  item;
                if (dt != null && dt.Rows.Count > 0 && ConvertUtility.ToInt32(dt.Rows[0][0]) > 0)
                {
                    item = new ListItem(MiscUtility.StringIndent(level) + "(" + row["TyTrong"].ToString() + "%) " + row["Ten"].ToString(), row["ID"].ToString());
                    item.Attributes.Add("Level", level.ToString());
                    //item.Attributes.Add("style", "color:red");
                    lstItems.Add(item);
                }
                else
                {
                    item = new ListItem(MiscUtility.StringIndent(level) + "(" + row["TyTrong"].ToString() + "%) " + row["Ten"].ToString(), row["ID"].ToString());
                    item.Attributes.Add("Level", level.ToString());
                    item.Attributes.Add("style", "color:red");
                    lstItems.Add(item);
                }

                LoadForCurItemChuaDuocGiao(lstItems, item, idTrungTam, idPhongBan, idDotDanhGia);
            }
        }
コード例 #2
0
        public static void LoadCongViecChuaDuocGiao(ListItemCollection lstItems, int idTrungTam, int idPhongBan, int idDotDanhGia)
        {
            DataTable dtZones = GetAllByParentID(0, idTrungTam, idPhongBan);

            foreach (DataRow row in dtZones.Rows)
            {
                DataTable dt = DotDanhGiaController.GetAllNhanVienTheoCongViec(ConvertUtility.ToInt32(row["ID"].ToString()), idDotDanhGia);
                ListItem  item;

                if (dt != null && dt.Rows.Count > 0 && ConvertUtility.ToInt32(dt.Rows[0][0]) > 0)
                {
                    item = new ListItem("(" + row["TyTrong"].ToString() + "%) " + row["Ten"].ToString(), row["ID"].ToString());
                    item.Attributes.Add("Level", "0");
                    item.Attributes.Add("style", "font-weight:bold;");
                    lstItems.Add(item);
                }
                else
                {
                    item = new ListItem("(" + row["TyTrong"].ToString() + "%) " + row["Ten"].ToString(), row["ID"].ToString());
                    item.Attributes.Add("Level", "0");
                    item.Attributes.Add("style", "font-weight:bold;color:red");
                    lstItems.Add(item);
                }

                LoadForCurItemChuaDuocGiao(lstItems, item, idTrungTam, idPhongBan, idDotDanhGia);
            }
        }