示例#1
0
 void btnReSubmit_Click(object sender, RoutedEventArgs e)
 {
     ObservableCollection<T_OA_VEHICLEDISPATCHRECORD> selectItems = GetSelectList();
     if (selectItems != null)
     {
         vehicledispatchrecord = selectItems.FirstOrDefault();
         VehicleDispatchRecord_upd form = new VehicleDispatchRecord_upd(FormTypes.Resubmit, vehicledispatchrecord.VEHICLEDISPATCHRECORDID);
         form.VehicleDispatchRecord = selectItems[0];
         EntityBrowser browser = new EntityBrowser(form);
         browser.FormType = FormTypes.Resubmit;
         browser.MinWidth = 750;
         browser.MinHeight = 600;
         browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
         browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
     }
     else
         ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "ReSubmit"), Utility.GetResourceStr("CONFIRMBUTTON"));
 }
示例#2
0
        //编辑
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            if (dg.SelectedItems == null)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTDATAALERT"));
                return;
            }

            if (dg.SelectedItems.Count == 0)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTDATAALERT"));
                return;
            }

            T_OA_VEHICLEDISPATCHRECORD ent = dg.SelectedItems[0] as T_OA_VEHICLEDISPATCHRECORD;
            if (ent.CHECKSTATE == ((int)CheckStates.UnSubmit).ToString() || ent.CHECKSTATE == ((int)CheckStates.UnApproved).ToString())
            {
                VehicleDispatchRecord_upd form = new VehicleDispatchRecord_upd(FormTypes.Edit, ent.VEHICLEDISPATCHRECORDID);
                EntityBrowser browser = new EntityBrowser(form);
                browser.FormType = FormTypes.Edit;
                browser.MinWidth = 750;
                browser.MinHeight = 600;
                browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
            }
            else
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTONLYCANMODIFYTHEDATASUBMITTED"));
                return;
            }
        }