Exemplo n.º 1
0
        //查看
        private void BtnView_Click(object sender, RoutedEventArgs e)
        {
            if (Organizationtable != null)
            {
                OrganAddForm  orgFrm  = new OrganAddForm(FormTypes.Browse, Organizationtable.ORGANIZATIONID, checkState);
                EntityBrowser browser = new EntityBrowser(orgFrm);
                browser.FormType         = FormTypes.Browse;
                browser.MinHeight        = 510;
                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"));
            }


            //ObservableCollection<string> organID = GridHelper.GetSelectItem(dgOrgan, "myChkBox", Action.Edit);
            //if (organID != null && organID.Count > 0)
            //{
            //    OrganAddForm orgFrm = new OrganAddForm(Action.Read, organID[0], checkState);
            //    EntityBrowser browser = new EntityBrowser(orgFrm);
            //    browser.MinHeight = 430;
            //    browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
            //    browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
            //}
            //else
            //{
            //    //HtmlPage.Window.Alert("请先选择需要查看的机构!");

            //    //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "VIEW"));

            //    ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "VIEW"), Utility.GetResourceStr("CONFIRMBUTTON"));
            //}
        }
Exemplo n.º 2
0
        //新增
        private void btnNew_Click(object sender, RoutedEventArgs e)
        {
            OrganAddForm  orgFrm  = new OrganAddForm(FormTypes.New, "", checkState);
            EntityBrowser browser = new EntityBrowser(orgFrm);

            browser.MinHeight        = 510;
            browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
            browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
        }
Exemplo n.º 3
0
 //查看
 private void btnRead_Click(object sender, RoutedEventArgs e)
 {
     if (Organizationtable != null)
     {
         OrganAddForm  orgFrm  = new OrganAddForm(FormTypes.Browse, Organizationtable.ORGANIZATIONID, checkState);
         EntityBrowser browser = new EntityBrowser(orgFrm);
         browser.MinHeight        = 510;
         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", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
     }
 }
Exemplo n.º 4
0
 //修改
 private void btnEdit_Click(object sender, RoutedEventArgs e)
 {
     if (Organizationtable != null)
     {
         if (Organizationtable.CHECKSTATE == "0" || Organizationtable.CHECKSTATE == "3")
         {
             OrganAddForm  orgFrm  = new OrganAddForm(FormTypes.Edit, Organizationtable.ORGANIZATIONID, Organizationtable.CHECKSTATE);
             EntityBrowser browser = new EntityBrowser(orgFrm);
             browser.FormType         = FormTypes.Edit;
             browser.MinHeight        = 510;
             browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
             browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
         }
         else
         {
             Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("ORGANREGISTERNOTEDIT"));
         }
     }
     else
     {
         ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
     }
 }