Ejemplo n.º 1
0
 private void myChkBoxCar_Checked(object sender, RoutedEventArgs e)
 {
     try
     {
         CheckBox chk = sender as CheckBox;
         if (chk.IsChecked.Value)
         {
             T_OA_REIMBURSEMENTDETAIL btlist = (T_OA_REIMBURSEMENTDETAIL)chk.DataContext;
             if (btlist != null)
             {
                 var ents = from ent in TravelDetailList_Golbal
                            where ent.REIMBURSEMENTDETAILID == btlist.REIMBURSEMENTDETAILID
                            select ent;
                 if (ents.Count() > 0)
                 {
                     int k = TravelDetailList_Golbal.IndexOf(ents.FirstOrDefault());
                     TravelDetailList_Golbal[k].COMPANYCAR = "1";
                     ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("您已勾选公司派车,无交通补贴!"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Logger.Current.Log(ex.Message, Category.Debug, Priority.Low);
         ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
     }
 }
Ejemplo n.º 2
0
        private void myChkBoxCar_Unchecked(object sender, RoutedEventArgs e)
        {
            CheckBox chk = sender as CheckBox;

            if (!chk.IsChecked.Value)
            {
                T_OA_REIMBURSEMENTDETAIL btlist = (T_OA_REIMBURSEMENTDETAIL)chk.DataContext;
                if (btlist != null)
                {
                    var ents = from ent in TravelDetailList_Golbal
                               where ent.REIMBURSEMENTDETAILID == btlist.REIMBURSEMENTDETAILID
                               select ent;
                    if (ents.Count() > 0)
                    {
                        int k = TravelDetailList_Golbal.IndexOf(ents.FirstOrDefault());
                        TravelDetailList_Golbal[k].COMPANYCAR = "0";
                    }
                }
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 禁用最后一条记录住宿费控件
        /// </summary>
        private void DisAbleLastTxtASubsidies()
        {
            int lastIndex = TravelDetailList_Golbal.Count() - 1;

            for (int i = 0; i < TravelDetailList_Golbal.Count(); i++)
            {
                var ent = TravelDetailList_Golbal[i];
                //住宿费
                TextBox txtASubsidies = DaGrEdit.Columns[9].GetCellContent(ent).FindName("txtACCOMMODATION") as TextBox;
                if (i > 0 && i == lastIndex)
                {
                    //txtASubsidies.IsEnabled = false;
                    txtASubsidies.IsReadOnly = true;
                    txtASubsidies.Text       = string.Empty;
                }
                else
                {
                    txtASubsidies.IsReadOnly = false;
                }
            }
        }
Ejemplo n.º 4
0
        private void Delete_Click(object sender, RoutedEventArgs e)
        {
            if (DaGrEdit.SelectedItems == null)
            {
                return;
            }

            if (DaGrEdit.SelectedItems.Count == 0)
            {
                return;
            }

            TravelDetailList_Golbal = DaGrEdit.ItemsSource as ObservableCollection <T_OA_REIMBURSEMENTDETAIL>;
            if (TravelDetailList_Golbal.Count() > 1)
            {
                int index  = DaGrEdit.SelectedIndex;                        //当前选中行
                var entity = TravelDetailList_Golbal[index];                //当前选择实体
                if (index > 0 && index < TravelDetailList_Golbal.Count - 1) //选择的不是第一条也不是最后一条
                {
                    //下一城市出发城市改为上一城市的到达城市值
                    TravelDetailList_Golbal[index + 1].DEPCITY = TravelDetailList_Golbal[index - 1].DESTCITY;
                    SearchCity mystarteachCity = DaGrEdit.Columns[1].GetCellContent(TravelDetailList_Golbal[index + 1]).FindName("txtDEPARTURECITY") as SearchCity;
                    mystarteachCity.TxtSelectedCity.Text = GetCityName(TravelDetailList_Golbal[index + 1].DEPCITY);
                }

                TravelDetailList_Golbal.Remove(entity);

                //DaGrEdit.ItemsSource = TravelDetailList_Golbal;
            }
            else
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), "必须保留一条出差时间及地点!", Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                return;
            }
            StandardsMethod(0);//显示选中的城市的出差标准
            //计算并给实体赋值
            SetTraveValueAndFBChargeValue();
            DisAbleLastTxtASubsidies();
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 获取出差报销补助
        /// </summary>
        /// <param name="i"></param>
        /// <returns></returns>
        private T_OA_AREAALLOWANCE StandardsMethod(int i)
        {
            string noAllowancePostlevelName = string.Empty;
            double noAllowancePostLevel     = Convert.ToDouble(travelsolutions.NOALLOWANCEPOSTLEVEL);

            if (!string.IsNullOrEmpty(travelsolutions.NOALLOWANCEPOSTLEVEL))
            {
                var ents = from a in Application.Current.Resources["SYS_DICTIONARY"] as List <T_SYS_DICTIONARY>
                           where a.DICTIONCATEGORY == "POSTLEVEL" && a.DICTIONARYVALUE == Convert.ToDecimal(travelsolutions.NOALLOWANCEPOSTLEVEL)
                           select new
                {
                    DICTIONARYNAME  = a.DICTIONARYNAME,
                    DICTIONARYVALUE = a.DICTIONARYVALUE
                };

                noAllowancePostlevelName = ents.FirstOrDefault().DICTIONARYNAME;
            }


            T_OA_AREAALLOWANCE entareaallowance = new T_OA_AREAALLOWANCE();

            textStandards.Text = string.Empty;
            if (TravelDetailList_Golbal.Count() == 1)                                  //只有一条记录的情况
            {
                string cityend = TravelDetailList_Golbal[0].DESTCITY.Replace(",", ""); //目标城市值
                entareaallowance = this.GetAllowanceByCityValue(cityend);
                if (entareaallowance == null)
                {
                    textStandards.Text = textStandards.Text + "出差城市:" + SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(cityend)
                                         + "出差报销标准未获取到。";
                    return(null);
                }
                if (EmployeePostLevel.ToInt32() <= noAllowancePostLevel)//当前用户的岗位级别小于副部长及以上级别的补贴标准
                {
                    textStandards.Text = textStandards.Text + "出差城市:" + SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(cityend)
                                         + "  您的岗位级别≥'" + noAllowancePostlevelName + "'级,无各项差旅补贴。";
                    if (entareaallowance == null)
                    {
                        textStandards.Text = textStandards.Text + "住宿标准:未获取到。"
                                             + "\n";
                    }
                    else
                    {
                        if (entareaallowance.ACCOMMODATION == null)
                        {
                            textStandards.Text = textStandards.Text + "住宿标准:未获取到。"
                                                 + "\n";
                        }
                        else
                        {
                            textStandards.Text = textStandards.Text + "住宿标准:" + entareaallowance.ACCOMMODATION + "元。"
                                                 + "\n";
                        }
                    }
                    //detail.TRANSPORTATIONSUBSIDIES = 0;
                    //detail.MEALSUBSIDIES = 0;
                    return(null);
                }
                if (textStandards.Text.Contains(SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(cityend)))
                {
                    //已经包含,直接跳过
                    return(entareaallowance);
                }

                if (TravelDetailList_Golbal[0].PRIVATEAFFAIR == "1")//如果是私事
                {
                    textStandards.Text = textStandards.Text + SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(cityend)
                                         + "的出差报销标准是:交通补贴:" + "无" + ",餐费补贴:"
                                         + "无" + ",住宿标准:无。"
                                         + "\n";
                }
                else if (TravelDetailList_Golbal[0].GOOUTTOMEET == "1")//如果是内部会议及培训
                {
                    textStandards.Text = textStandards.Text + SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(cityend)
                                         + "的出差为《内部会议、培训》,无各项差旅补贴。"
                                         + "\n";
                }
                else if (TravelDetailList_Golbal[0].COMPANYCAR == "1")//如果是公司派车
                {
                    textStandards.Text = textStandards.Text + SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(cityend)
                                         + "的出差报销标准是:交通补贴:" + "无" + "餐费补贴:" + entareaallowance.MEALSUBSIDIES.ToString()
                                         + "元,住宿标准:" + entareaallowance.ACCOMMODATION + "元。"
                                         + "\n";
                    //textStandards.Text += "(以上为员工现岗位级别的补贴,仅供参考)";
                }
                else if (EmployeePostLevel.ToInt32() <= noAllowancePostLevel)//当前用户的岗位级别小于副部长及以上级别的无各项补贴
                {
                    //textStandards.Text = "您的岗位级别≥'I'级,无各项差旅补贴。";
                    textStandards.Text = textStandards.Text + "出差城市:" + SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(cityend)
                                         + "  您的岗位级别≥'" + noAllowancePostlevelName + "'级,无各项差旅补贴。";
                    textStandards.Text = textStandards.Text + "住宿标准:" + entareaallowance.ACCOMMODATION + "元。"
                                         + "\n";
                    //textStandards.Text += "(以上为员工现岗位级别的补贴,仅供参考)";
                }
                else
                {
                    textStandards.Text = textStandards.Text + SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(cityend)
                                         + "的出差报销标准是:交通补贴:" + entareaallowance.TRANSPORTATIONSUBSIDIES
                                         + "元,餐费补贴:" + entareaallowance.MEALSUBSIDIES.ToString()
                                         + "元,住宿标准:" + entareaallowance.ACCOMMODATION + "元。"
                                         + "\n";
                    //textStandards.Text += "(以上为员工现岗位级别的补贴,仅供参考)";
                }
            }
            else
            {
                for (int j = 0; j < TravelDetailList_Golbal.Count() - 1; j++)           //最后一条记录没有补贴
                {
                    string city = TravelDetailList_Golbal[j].DESTCITY.Replace(",", ""); //目标城市值
                    entareaallowance = this.GetAllowanceByCityValue(city);
                    if (EmployeePostLevel.ToInt32() <= noAllowancePostLevel)            //当前用户的岗位级别小于副部长及以上级别的补贴标准
                    {
                        textStandards.Text = textStandards.Text + "出差城市:" + SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(city)
                                             + "  您的岗位级别≥'" + noAllowancePostlevelName + "'级,无各项差旅补贴。";
                        if (entareaallowance == null)
                        {
                            textStandards.Text = textStandards.Text + "住宿标准:未获取到。"
                                                 + "\n";
                        }
                        else
                        {
                            if (entareaallowance.ACCOMMODATION == null)
                            {
                                textStandards.Text = textStandards.Text + "住宿标准:未获取到。"
                                                     + "\n";
                            }
                            else
                            {
                                textStandards.Text = textStandards.Text + "住宿标准:" + entareaallowance.ACCOMMODATION + "元。"
                                                     + "\n";
                            }
                        }
                        //detail.TRANSPORTATIONSUBSIDIES = 0;
                        //detail.MEALSUBSIDIES = 0;
                        //return null;
                    }
                    if (textStandards.Text.Contains(SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(city)))
                    {
                        //已经包含,直接跳过
                        continue;
                    }
                    if (entareaallowance != null)                            //根据出差的城市及出差人的级别,将当前出差人的标准信息显示在备注中
                    {
                        if (TravelDetailList_Golbal[j].PRIVATEAFFAIR == "1") //如果是私事
                        {
                            textStandards.Text = textStandards.Text + SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(city)
                                                 + "的出差报销标准是:交通补贴:" + "无" + ",餐费补贴:" + "无" + ",住宿标准:" + "无。"
                                                 + "\n";
                        }
                        else if (TravelDetailList_Golbal[j].GOOUTTOMEET == "1")//如果是内部会议及培训
                        {
                            //textStandards.Text = textStandards.Text + SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(cityValue) + "的出差为《内部会议、培训》,无各项差旅补贴。\n";
                            textStandards.Text = textStandards.Text + SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(city)
                                                 + "的出差为《内部会议、培训》,无各项差旅补贴。"
                                                 + "\n";
                        }
                        else if (TravelDetailList_Golbal[j].COMPANYCAR == "1")//如果是公司派车
                        {
                            textStandards.Text = textStandards.Text + SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(city)
                                                 + "的出差报销标准是:交通补贴:" + "无" + ",餐费补贴:" + entareaallowance.MEALSUBSIDIES.ToString()
                                                 + "元,住宿标准:" + entareaallowance.ACCOMMODATION + "元。"
                                                 + "\n";
                            //textStandards.Text += "(以上为员工现岗位级别的补贴,仅供参考)";
                        }
                        else if (EmployeePostLevel.ToInt32() <= noAllowancePostLevel)//当前用户的岗位级别小于副部长及以上级别的无各项补贴
                        {
                            //textStandards.Text = "您的岗位级别≥'I'级,无各项差旅补贴。";
                            textStandards.Text = textStandards.Text + "出差城市:" + SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(city)
                                                 + "  您的岗位级别≥'" + noAllowancePostlevelName + "'级,无各项差旅补贴。";
                            textStandards.Text = textStandards.Text + "住宿标准:" + entareaallowance.ACCOMMODATION + "元。"
                                                 + "\n";
                            //textStandards.Text += "(以上为员工现岗位级别的补贴,仅供参考)";
                        }
                        else
                        {
                            textStandards.Text = textStandards.Text + SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(city)
                                                 + "的出差报销标准是:交通补贴:" + entareaallowance.TRANSPORTATIONSUBSIDIES
                                                 + "元,餐费补贴:" + entareaallowance.MEALSUBSIDIES.ToString()
                                                 + "元,住宿标准:" + entareaallowance.ACCOMMODATION + "元。"
                                                 + "\n";
                            //textStandards.Text += "(以上为员工现岗位级别的补贴,仅供参考)";
                        }
                    }
                    else
                    {
                        textStandards.Text = textStandards.Text + SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(city) + "没有相应的出差标准。"
                                             + "\n";
                    }
                }
            }


            string cityValue = TravelDetailList_Golbal[i].DESTCITY.Replace(",", "");//目标城市值

            entareaallowance = this.GetAllowanceByCityValue(cityValue);
            if (textStandards.Text.Contains(SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(cityValue)))
            {
                //已经包含,直接返回
                return(entareaallowance);
            }
            if (i == TravelDetailList_Golbal.Count)
            {
                //出差结束城市无补贴
                return(entareaallowance);
            }

            return(entareaallowance);
        }
Ejemplo n.º 6
0
        void btnNew_Click(object sender, RoutedEventArgs e)
        {
            if (!CheckIsFinishedCitys())
            {
                return;
            }

            BtnNewButton = true;
            int i = 0;
            T_OA_REIMBURSEMENTDETAIL NewDetail = new T_OA_REIMBURSEMENTDETAIL();

            NewDetail.REIMBURSEMENTDETAILID = Guid.NewGuid().ToString();

            if (formType != FormTypes.New)
            {
                if (TravelDetailList_Golbal.Count() > 0)
                {
                    if (TravelDetailList_Golbal.LastOrDefault().DESTCITY == TravelDetailList_Golbal.FirstOrDefault().DEPCITY)
                    {
                        MessageBox.Show("请修改最后一条记录的到达城市后再新增记录!");
                        return;
                    }
                    //将原有记录的最后一条记录的目的城市作为出发城市。
                    //NewDetail.DEPCITY = SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(TrList.LastOrDefault<T_OA_REIMBURSEMENTDETAIL>().DESTCITY);
                    if (TravelDetailList_Golbal.LastOrDefault <T_OA_REIMBURSEMENTDETAIL>() != null)
                    {
                        //默认出发城市为上一条记录的到达城市
                        NewDetail.DEPCITY = TravelDetailList_Golbal.LastOrDefault <T_OA_REIMBURSEMENTDETAIL>().DESTCITY;
                        //默认出发日期为上一条记录的结束时间+1天
                        NewDetail.STARTDATE = TravelDetailList_Golbal.LastOrDefault <T_OA_REIMBURSEMENTDETAIL>().ENDDATE.Value.AddDays(1);
                        //默认结束城市为出差出发城市
                        NewDetail.DESTCITY = TravelDetailList_Golbal.FirstOrDefault <T_OA_REIMBURSEMENTDETAIL>().DEPCITY;
                        //默认结束日期为出发时间+1
                        NewDetail.ENDDATE = NewDetail.STARTDATE.Value.AddDays(1);
                    }
                }
                NewDetail.TYPEOFTRAVELTOOLS = "3"; //默认乘坐交通工具为火车
                NewDetail.TAKETHETOOLLEVEL  = "1"; //默认交通工具级别为硬卧
                //NewDetail.ENDDATE = DateTime.Now;
                TravelDetailList_Golbal.Add(NewDetail);
                //禁用所有开始城市选择控件?
                foreach (Object obje in DaGrEdit.ItemsSource)
                {
                    if (DaGrEdit.Columns[1].GetCellContent(obje) != null)
                    {
                        SearchCity myCity = DaGrEdit.Columns[1].GetCellContent(obje).FindName("txtDEPARTURECITY") as SearchCity;

                        if (myCity != null)
                        {
                            myCity.IsEnabled = false;
                            ((DataGridCell)((StackPanel)myCity.Parent).Parent).IsEnabled = false;
                        }
                    }
                }
            }

            int lastIndex = TravelDetailList_Golbal.Count() - 1;

            StandardsMethod(lastIndex);//显示选中的城市的出差标准
            //计算并给实体赋值
            SetTraveValueAndFBChargeValue();
            DisAbleLastTxtASubsidies();
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 操作子表数据
        /// </summary>
        private void SetTravelDetailValueFromForm()
        {
            string StrStartDt   = ""; //开始时间
            string StrStartTime = ""; //开始时:分
            string EndDt        = ""; //结束时间
            string StrEndTime   = ""; //结束时:分
            int    i            = 0;

            if (DaGrEdit.ItemsSource != null)
            {
                //foreach (Object obje in DaGrEdit.ItemsSource)
                foreach (var obje in TravelDetailList_Golbal)
                {
                    TrDetail = obje;
                    TrDetail.REIMBURSEMENTDETAILID = (obje as T_OA_REIMBURSEMENTDETAIL).REIMBURSEMENTDETAILID;

                    TrDetail.T_OA_TRAVELREIMBURSEMENT = TravelReimbursement_Golbal;
                    //出发时间
                    DateTimePicker StartDate = ((DateTimePicker)((StackPanel)DaGrEdit.Columns[0].GetCellContent(obje)).Children.FirstOrDefault()) as DateTimePicker;
                    //到达时间
                    DateTimePicker EndDate = ((DateTimePicker)((StackPanel)DaGrEdit.Columns[2].GetCellContent(obje)).Children.FirstOrDefault()) as DateTimePicker;
                    //出差天数
                    TextBox datys = ((TextBox)((StackPanel)DaGrEdit.Columns[4].GetCellContent(obje)).Children.FirstOrDefault()) as TextBox;
                    //住宿天数
                    TextBox Newdatys = ((TextBox)((StackPanel)DaGrEdit.Columns[5].GetCellContent(obje)).Children.FirstOrDefault()) as TextBox;
                    //交通工具类型
                    TravelDictionaryComboBox ToolType = ((TravelDictionaryComboBox)((StackPanel)DaGrEdit.Columns[6].GetCellContent(obje)).Children.FirstOrDefault()) as TravelDictionaryComboBox;
                    //交通工具级别
                    TravelDictionaryComboBox ToolLevel = ((TravelDictionaryComboBox)((StackPanel)DaGrEdit.Columns[7].GetCellContent(obje)).Children.FirstOrDefault()) as TravelDictionaryComboBox;

                    //交通费第8列
                    TextBox txtToolubsidies = ((TextBox)((StackPanel)DaGrEdit.Columns[8].GetCellContent(obje)).Children.FirstOrDefault()) as TextBox;
                    //住宿费第9列
                    TextBox txtASubsidies = ((TextBox)((StackPanel)DaGrEdit.Columns[9].GetCellContent(obje)).Children.FirstOrDefault()) as TextBox;
                    //交通补贴第10列
                    TextBox txtTFSubsidies = ((TextBox)((StackPanel)DaGrEdit.Columns[10].GetCellContent(obje)).Children.FirstOrDefault()) as TextBox;
                    //餐费补贴第11列
                    TextBox txtMealSubsidies = ((TextBox)((StackPanel)DaGrEdit.Columns[11].GetCellContent(obje)).Children.FirstOrDefault()) as TextBox;
                    //其他费用第12列
                    TextBox txtOthercosts = ((TextBox)((StackPanel)DaGrEdit.Columns[12].GetCellContent(obje)).Children.FirstOrDefault()) as TextBox;
                    //是否私事
                    CheckBox IsCheck = ((CheckBox)((StackPanel)DaGrEdit.Columns[13].GetCellContent(obje)).Children.FirstOrDefault()) as CheckBox;
                    //是否会议
                    CheckBox IsCheckMeet = ((CheckBox)((StackPanel)DaGrEdit.Columns[14].GetCellContent(obje)).Children.FirstOrDefault()) as CheckBox;
                    //是否公司派车
                    CheckBox IsCheckCar = ((CheckBox)((StackPanel)DaGrEdit.Columns[15].GetCellContent(obje)).Children.FirstOrDefault()) as CheckBox;

                    StrStartDt   = StartDate.Value.Value.ToString("d");     //开始日期
                    EndDt        = EndDate.Value.Value.ToString("d");       //结束日期
                    StrStartTime = StartDate.Value.Value.ToString("HH:mm"); //开始时间
                    StrEndTime   = EndDate.Value.Value.ToString("HH:mm");   //结束时间

                    DateTime DtStart = System.Convert.ToDateTime(StrStartDt + " " + StrStartTime);;
                    DateTime DtEnd   = System.Convert.ToDateTime(EndDt + " " + StrEndTime);

                    TrDetail.UPDATEUSERID   = Common.CurrentLoginUserInfo.EmployeeID;   //修改人ID
                    TrDetail.CREATEUSERNAME = Common.CurrentLoginUserInfo.EmployeeName; //创建人姓名
                    TrDetail.CREATEDATE     = DateTime.Now;
                    TrDetail.UPDATEDATE     = DateTime.Now;
                    if (DtStart != null)//开始时间
                    {
                        TrDetail.STARTDATE = DtStart;
                    }
                    if (DtEnd != null)//结束时间
                    {
                        TrDetail.ENDDATE = DtEnd;
                    }
                    if (datys != null)//出差天数
                    {
                        TrDetail.BUSINESSDAYS = datys.Text;
                    }
                    if (Newdatys != null)//住宿天数
                    {
                        if (!string.IsNullOrEmpty(TrDetail.BUSINESSDAYS))
                        {
                            TrDetail.THENUMBEROFNIGHTS = TrDetail.BUSINESSDAYS;
                        }
                    }
                    if (TravelDetailList_Golbal.Count() > 0)
                    {
                        TrDetail.DEPCITY = TravelDetailList_Golbal[i].DEPCITY.Replace(",", "");//出发城市
                    }
                    if (TravelDetailList_Golbal.Count() > 0)
                    {
                        TrDetail.DESTCITY = TravelDetailList_Golbal[i].DESTCITY.Replace(",", ""); //目标城市
                    }
                    if (ToolType != null)                                                         //乘坐交通工具类型
                    {
                        T_SYS_DICTIONARY ComVechileObj = ToolType.SelectedItem as T_SYS_DICTIONARY;
                        TrDetail.TYPEOFTRAVELTOOLS = ComVechileObj.DICTIONARYVALUE.ToString();
                    }
                    if (ToolLevel != null)//乘坐交通工具级别
                    {
                        if (ToolLevel.SelectedIndex > 0)
                        {
                            T_SYS_DICTIONARY ComLevelObj = ToolLevel.SelectedItem as T_SYS_DICTIONARY;
                            TrDetail.TAKETHETOOLLEVEL = ComLevelObj.DICTIONARYVALUE.ToString();
                        }
                    }
                    if (txtToolubsidies != null)//交通费
                    {
                        if (!string.IsNullOrEmpty(txtToolubsidies.Text))
                        {
                            TrDetail.TRANSPORTCOSTS = Convert.ToDecimal(txtToolubsidies.Text);
                        }
                        else
                        {
                            TrDetail.TRANSPORTCOSTS = 0;
                        }
                    }
                    if (txtASubsidies != null)//住宿标准费用
                    {
                        if (!string.IsNullOrEmpty(txtASubsidies.Text))
                        {
                            TrDetail.ACCOMMODATION = Convert.ToDecimal(txtASubsidies.Text);
                        }
                        else
                        {
                            TrDetail.ACCOMMODATION = 0;
                        }
                    }
                    if (txtTFSubsidies != null)//交通费用补贴
                    {
                        if (!string.IsNullOrEmpty(txtTFSubsidies.Text))
                        {
                            TrDetail.TRANSPORTATIONSUBSIDIES = Convert.ToDecimal(txtTFSubsidies.Text);
                        }
                        else
                        {
                            TrDetail.TRANSPORTATIONSUBSIDIES = 0;
                        }
                    }
                    if (txtMealSubsidies != null)//餐费补贴
                    {
                        if (!string.IsNullOrEmpty(txtMealSubsidies.Text))
                        {
                            TrDetail.MEALSUBSIDIES = Convert.ToDecimal(txtMealSubsidies.Text);
                        }
                        else
                        {
                            TrDetail.MEALSUBSIDIES = 0;
                        }
                    }
                    if (txtOthercosts != null)//其他费用
                    {
                        if (!string.IsNullOrEmpty(txtOthercosts.Text))
                        {
                            TrDetail.OTHERCOSTS = Convert.ToDecimal(txtOthercosts.Text);
                        }
                        else
                        {
                            TrDetail.OTHERCOSTS = 0;
                        }
                    }
                    #region  面的金额赋值存在丢失现象,再次赋值
                    ////交通费第8列
                    //TextBox txtToolubsidies_agin = ((TextBox)((StackPanel)DaGrEdit.Columns[8].GetCellContent(obje)).Children.FirstOrDefault()) as TextBox;
                    ////住宿费第9列
                    //TextBox txtASubsidies_agin = ((TextBox)((StackPanel)DaGrEdit.Columns[9].GetCellContent(obje)).Children.FirstOrDefault()) as TextBox;
                    ////交通补贴第10列
                    //TextBox txtTFSubsidies_agin = ((TextBox)((StackPanel)DaGrEdit.Columns[10].GetCellContent(obje)).Children.FirstOrDefault()) as TextBox;
                    ////餐费补贴第11列
                    //TextBox txtMealSubsidies_agin = ((TextBox)((StackPanel)DaGrEdit.Columns[11].GetCellContent(obje)).Children.FirstOrDefault()) as TextBox;
                    ////其他费用第12列
                    //TextBox txtOthercosts_agin = ((TextBox)((StackPanel)DaGrEdit.Columns[12].GetCellContent(obje)).Children.FirstOrDefault()) as TextBox;


                    //if (txtToolubsidies_agin != null)
                    //{
                    //    if (!string.IsNullOrEmpty(txtToolubsidies_agin.Text))
                    //    {
                    //        TrDetail.TRANSPORTCOSTS = Convert.ToDecimal(txtToolubsidies_agin.Text);//交通费
                    //    }
                    //}
                    //if (txtASubsidies_agin != null)
                    //{
                    //    if (!string.IsNullOrEmpty(txtASubsidies_agin.Text))
                    //    {
                    //         TrDetail.ACCOMMODATION = Convert.ToDecimal(txtASubsidies_agin.Text);//住宿费
                    //    }
                    //}

                    //if (txtTFSubsidies_agin != null)
                    //{
                    //    if (!string.IsNullOrEmpty(txtTFSubsidies_agin.Text))
                    //    {
                    //        TrDetail.TRANSPORTATIONSUBSIDIES = Convert.ToDecimal(txtTFSubsidies_agin.Text);//交通补贴
                    //    }
                    //}
                    //if (txtMealSubsidies != null)
                    //{
                    //    if (!string.IsNullOrEmpty(txtMealSubsidies.Text))
                    //    {
                    //        TrDetail.MEALSUBSIDIES = Convert.ToDecimal(txtMealSubsidies.Text);// 餐费补贴
                    //    }
                    //}
                    //if (txtOthercosts_agin != null)
                    //{
                    //    if (!string.IsNullOrEmpty(txtOthercosts_agin.Text))
                    //    {
                    //        TrDetail.OTHERCOSTS = Convert.ToDecimal(txtOthercosts_agin.Text); //其他费用
                    //    }
                    //}
                    #endregion

                    if (IsCheck != null)//是否是私事
                    {
                        TrDetail.PRIVATEAFFAIR = (bool)IsCheck.IsChecked ? "1" : "0";
                    }
                    if (IsCheckMeet != null)//是否是开会
                    {
                        TrDetail.GOOUTTOMEET = (bool)IsCheckMeet.IsChecked ? "1" : "0";
                    }
                    if (IsCheckCar != null)//公司派车
                    {
                        TrDetail.COMPANYCAR = (bool)IsCheckCar.IsChecked ? "1" : "0";
                    }

                    //ListDetail.Add(TrDetail);

                    i++;
                }
            }
        }