private void LvRecordScoreDetail_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            KpiMapObjectInfoItem item = LvRecordScoreDetail.SelectedItem as KpiMapObjectInfoItem;

            if (item != null)
            {
                mCurrentKpiMapObjectInfoItem     = item;
                LvRecordScoreDetail.SelectedItem = mCurrentKpiMapObjectInfoItem;
            }
        }
        private void TvSkillGroup_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            mCurrentKpiMapObjectInfoItem = null;
            ObjectItem item = TvSkillGroup.SelectedItem as ObjectItem;

            if (item != null)
            {
                mCurrentObjectItem = item;
                //不需要加载选中的对象的列
                LbCurrentObject.Text = mCurrentObjectItem.Name;
                LoadKpiMapObjectInfo();
            }
        }
        public override void ChangeLanguage()
        {
            try
            {
                base.ChangeLanguage();
                //Operation
                for (int i = 0; i < ListOperations.Count; i++)
                {
                    ListOperations[i].Display = CurrentApp.GetLanguageInfo(string.Format("FO{0}", ListOperations[i].ID), ListOperations[i].ID.ToString());
                }
                CreateOptButtons();

                // Other
                tabOrg.Header   = CurrentApp.GetLanguageInfo("46010001", "Organizition");
                tabSkill.Header = CurrentApp.GetLanguageInfo("46010002", "Skill Group");

                //Columns
                CreateObjcetKPIDetailColumns();

                //记录列(ListView)中的内容
                for (int i = 0; i < mListKpiMapObjectInfoItem.Count; i++)
                {
                    KpiMapObjectInfoItem item = mListKpiMapObjectInfoItem[i];
                    item.StrKPIName    = CurrentApp.GetLanguageInfo(string.Format("4601KPI{0}", item.KpiMapObjectInfo.KpiID), item.KPIName.ToString());
                    item.StrApplyCycle = CurrentApp.GetLanguageInfo(string.Format("4601BP{0}", item.ApplyCycle), item.ApplyCycle.ToString());
                    item.StrIsActive   = CurrentApp.GetLanguageInfo(string.Format("4601IsActive{0}", item.IsActive), item.IsActive.ToString());
                    item.StrDropDown   = CurrentApp.GetLanguageInfo(string.Format("4601BPDropDown{0}", item.DropDown), item.DropDown.ToString());
                    item.StrApplyAll   = CurrentApp.GetLanguageInfo(string.Format("4601BPApplyAll{0}", item.ApplyAll), item.ApplyAll.ToString());
                    item.StrObjectType = CurrentApp.GetLanguageInfo(string.Format("4601BPOBJ{0}", item.ObjectType), item.ObjectType.ToString());
                }

                PopupPanel.ChangeLanguage();
            }
            catch (Exception ex)
            {
            }
        }
 public void LoadKpiMapObjectInfo()
 {
     try
     {
         WebRequest webRequest = new WebRequest();
         webRequest.Code    = (int)S4601Codes.LoadKpiMapObjectInfo;
         webRequest.Session = CurrentApp.Session;
         webRequest.ListData.Add(mCurrentObjectItem.ObjID.ToString());    //对象ID
         webRequest.ListData.Add(mCurrentObjectItem.ParantID.ToString()); //对象的ParantID
         Service46011Client client = new Service46011Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session),
                                                            WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service46011"));
         //Service46011Client client = new Service46011Client();
         WebReturn webReturn = client.DoOperation(webRequest);
         client.Close();
         if (!webReturn.Result)
         {
             ShowException(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message));
             return;
         }
         mlistKpiMapObjectInfo.Clear();
         mListKpiMapObjectInfoItem.Clear();
         for (int i = 0; i < webReturn.ListData.Count; i++)
         {
             OperationReturn optReturn = XMLHelper.DeserializeObject <KpiMapObjectInfo>(webReturn.ListData[i]);
             if (!optReturn.Result)
             {
                 ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message));
                 return;
             }
             KpiMapObjectInfo kpiInfo = optReturn.Data as KpiMapObjectInfo;
             if (kpiInfo != null)
             {
                 mlistKpiMapObjectInfo.Add(kpiInfo);
             }
             KpiMapObjectInfoItem item = new KpiMapObjectInfoItem(kpiInfo);
             //新增的属性 每个绑定的数据源里都有一个对象 然后就将选中的对象赋过去
             item.ObjectItem = mCurrentObjectItem;
             mListKpiMapObjectInfoItem.Add(item);
         }
         for (int i = 0; i < mListKpiMapObjectInfoItem.Count; i++)
         {
             KpiMapObjectInfoItem item = mListKpiMapObjectInfoItem[i];
             item.StrKPIName    = CurrentApp.GetLanguageInfo(string.Format("4601KPI{0}", item.KpiMapObjectInfo.KpiID), item.KPIName.ToString());
             item.StrApplyCycle = CurrentApp.GetLanguageInfo(string.Format("4601BP{0}", item.ApplyCycle), item.ApplyCycle.ToString());
             item.StrIsActive   = CurrentApp.GetLanguageInfo(string.Format("4601IsActive{0}", item.IsActive), item.IsActive.ToString());
             item.StrDropDown   = CurrentApp.GetLanguageInfo(string.Format("4601BPDropDown{0}", item.DropDown), item.DropDown.ToString());
             item.StrApplyAll   = CurrentApp.GetLanguageInfo(string.Format("4601BPApplyAll{0}", item.ApplyAll), item.ApplyAll.ToString());
             if (Regex.Matches(item.ObjectType, @"1").Count > 1)//这个字符串中1的个数大于1
             {
                 item.StrObjectType = string.Empty;
                 if (item.ObjectType.Substring(0, 1) == "1")
                 {
                     item.StrObjectType += CurrentApp.GetLanguageInfo(string.Format("4601BPOBJ{0}", "1000000000"), "1000000000") + "  ";
                 }
                 if (item.ObjectType.Substring(1, 1) == "1")
                 {
                     item.StrObjectType += CurrentApp.GetLanguageInfo(string.Format("4601BPOBJ{0}", "0100000000"), "0100000000") + "  ";
                 }
                 if (item.ObjectType.Substring(2, 1) == "1")
                 {
                     item.StrObjectType += CurrentApp.GetLanguageInfo(string.Format("4601BPOBJ{0}", "0010000000"), "0010000000") + "  ";
                 }
                 if (item.ObjectType.Substring(3, 1) == "1")
                 {
                     item.StrObjectType += CurrentApp.GetLanguageInfo(string.Format("4601BPOBJ{0}", "0001000000"), "0001000000") + "  ";
                 }
             }
             else
             {
                 item.StrObjectType = CurrentApp.GetLanguageInfo(string.Format("4601BPOBJ{0}", item.ObjectType), item.ObjectType.ToString());
             }
         }
     }
     catch (Exception ex)
     {
         ShowException(ex.Message);
     }
 }