예제 #1
0
        public ChangeEndAddServis(Model.Servis servis)
        {
            InitializeComponent();

            contoller             = new Model.ServisesContoller(servis);
            Service               = contoller.ServiceOne;
            Service.MainImagePath = s + Service.MainImagePath;
            gr.DataContext        = Service;
        }
예제 #2
0
        private void Save_Click(object sender, RoutedEventArgs e)
        {
            if (Service == null)
            {
                Service   = gr.DataContext as DB.Service;
                contoller = new Model.ServisesContoller(Service);
            }
            else
            {
                Service = gr.DataContext as DB.Service;
                Service.MainImagePath = Service.MainImagePath.Substring(s.Length);
                contoller.ServiceOne  = Service;
                contoller.Save();
            }

            this.DialogResult = true;
            this.Close();
        }