
///////////////////////////////////////////////////////////////////////////////  
//文件名称: WinMaintainerBaseInfo.xaml
//文件描述: 维修商信息列表
//创 建 者: xls
//创建日期: 2018/5/24 22:04:55
//版 本 号：1.0.0.0
////////////////////////////////////////////////////////////////////////////////

using FWindSoft.Wpf;
using FWindSoft.Wpf.Controls;
using System;
using System.Windows;

namespace Com.FirmLib.UI.Maintainer
{
    /// <summary>
    /// WinMaintainerList.xaml 的交互逻辑
    /// </summary>
    public partial class WinMaintainerBaseInfo : NChildWindow
    {
        private VmMaintainerBaseInfo m_Vm;
        public WinMaintainerBaseInfo():this(new VmMaintainerBaseInfo())
        {
          
        }
        public WinMaintainerBaseInfo(VmMaintainerBaseInfo vm)
        {
            InitializeComponent();
            this.m_Vm = vm;
            this.m_Vm.SetRefView(this);
            this.DataContext = this.m_Vm;
            this.EveryTimeLoad = true;
        }
        protected override void LoadData(LoadParameter parameter)
        {
            //初始化列表数据
             TryCatchWrapper.Handled(() => this.m_Vm.Init(parameter));
        }
        #region 界面关联事件
        private void btnOK_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (this.HasError())
                {
                    //MessageShow.Infomation("请修改错误输入项");
                    return;
                }
                //if (Execute())
                //{
                //    MessageShow.Infomation("");
                //    DialogResult = true;
                //}
            }
            catch (Exception ex)
            {
                //MessageShow.Show(ex);
            }
        }

        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }
        #endregion
    }
}
