void BtnView_Click(object sender, RoutedEventArgs e)
        {
            ObservableCollection<T_OA_VEHICLEDISPATCH> selectItems = GetSelectList();

            T_OA_VEHICLEDISPATCH ent = dg.SelectedItems[0] as T_OA_VEHICLEDISPATCH;
            if (ent != null)
            {
                //vehicledispatchInfo = selectItems.FirstOrDefault();
                //VehicleDispatchForm_aud form1 = new VehicleDispatchForm_aud(FormTypes.Browse, vehicledispatchInfo.VEHICLEDISPATCHID);
                VehicleDispatchForm_aud form = new VehicleDispatchForm_aud(FormTypes.Browse, ent.VEHICLEDISPATCHID);
                //form.VehicleDispatch = selectItems[0];
                EntityBrowser browser = new EntityBrowser(form);
                browser.FormType = FormTypes.Browse;
                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", "VIEW"), Utility.GetResourceStr("CONFIRMBUTTON"));
            }
        }
        void btnAudit_Click(object sender, RoutedEventArgs e)
        {
            if (dg.SelectedItems == null)
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "AUDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }

            if (dg.SelectedItems.Count == 0)
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "AUDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }

            T_OA_VEHICLEDISPATCH ent = dg.SelectedItems[0] as T_OA_VEHICLEDISPATCH;
            if (ent.CHECKSTATE == ((int)CheckStates.Approving).ToString() ||
                ent.CHECKSTATE == ((int)CheckStates.WaittingApproval).ToString() ||
                ent.CHECKSTATE == ((int)CheckStates.UnSubmit).ToString())
            {
                VehicleDispatchForm_aud form = new VehicleDispatchForm_aud(FormTypes.Audit, ent.VEHICLEDISPATCHID);
                EntityBrowser browser = new EntityBrowser(form);
                browser.FormType = FormTypes.Audit;
                browser.MinHeight = 550;
                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("SELECTRECORDNOTOPERATEPLEASEAGAIN"));
                return;
            }
        }