private SalaryProcedureInfoWrap GetSalaryProcedureInfo(SalaryInfo salaryInfo, ref bool isUpdateTotalPrice)
        {
            SalaryProcedureInfoWrap salaryProcedureInfoWrap = new SalaryProcedureInfoWrap()
            {
                EmployeeName   = salaryInfo.EmployeeName,
                DepartmentName = salaryInfo.DepartmentName,
                CurrentDate    = new DateTime(salaryInfo.Year, salaryInfo.Month, 1)
            };

            ObservableCollection <ProcedureInfo> CurProcedureInfoList = null;

            foreach (SheetInfo sheetInfo in dataManager.AllSheetList)
            {
                //结单了
                if (sheetInfo.SettleDate == null)
                {
                    continue;
                }

                //本月内
                DateTime dateValue = sheetInfo.SettleDate.Value;
                if (dateValue.Year == salaryInfo.Year && dateValue.Month == salaryInfo.Month)
                {
                    CurProcedureInfoList = SheetDeal.GetAllProcedureInfo(sheetInfo.ID);
                    if (CurProcedureInfoList == null)
                    {
                        continue;
                    }

                    CurProcedureInfoList.ToList().ForEach(procedureInfo =>
                    {
                        //该人参与该流程
                        if (procedureInfo.EmployeeID == salaryInfo.EmployeeID)
                        {
                            salaryProcedureInfoWrap.TotalPrice += procedureInfo.Price;
                            salaryProcedureInfoWrap.SalaryProcedureInfoList.Add(new SalaryProcedureInfo
                            {
                                SheetID       = sheetInfo.ID,
                                SettleDate    = dateValue,
                                BSType        = sheetInfo.BSType,
                                Customer      = sheetInfo.Customer,
                                ProcedureName = procedureInfo.ProcedureName,
                                Price         = procedureInfo.Price
                            });
                        }
                    });
                }
            }
            if (salaryInfo.Commission != salaryProcedureInfoWrap.TotalPrice)
            {
                isUpdateTotalPrice    = true;
                salaryInfo.Commission = salaryProcedureInfoWrap.TotalPrice;
            }

            return(salaryProcedureInfoWrap);
        }
        private void UpdateProcefureInfo()
        {
            if (SheetDataGrid.SelectedItem == null)
            {
                return;
            }

            SheetInfo sheetInfo = SheetDataGrid.SelectedItem as SheetInfo;

            //获取该单所对应的流程信息
            CurProcedureInfoList = SheetDeal.GetAllProcedureInfo(sheetInfo.ID);
            //获取跟单员
            sheetInfo.Follower = AlgorithmClass.GetFollowers(CurProcedureInfoList);

            BsTypeInfo bsTypeInfo = dataManager.AllBsTypeList.Where(type => type.TypeName == sheetInfo.BSType).FirstOrDefault();

            //获取该单中业务类型的全部流程信息 供选择更改
            CurSelectionProcedureInfoList = AlgorithmClass.GetSelectionProcedureInfoList(bsTypeInfo.ProcedurePrice);
            CurProcedureInfoList.ToList().ForEach(info => info.SelectionProcedureInfoList = CurSelectionProcedureInfoList);

            CurBOPInfoList      = SheetDeal.GetAllSheetBOPInfo(sheetInfo.ID);
            TotalTextBlock.Text = AlgorithmClass.GetBOPTotal(CurBOPInfoList).ToString();

            //绑定
            ProcedureDataGrid.ItemsSource = CurProcedureInfoList;
            BOPDataGrid.ItemsSource       = CurBOPInfoList;

            if (CurProcedureInfoList.Count == CurSelectionProcedureInfoList.Count)
            {
                AddRowBtn.IsEnabled = false;
            }
            else
            {
                AddRowBtn.IsEnabled = true;
            }
        }