Exemplo n.º 1
0
 void BtnView_Click(object sender, RoutedEventArgs e)
 {
     if (Hirerecord != null)
     {
         HireRecordForm form    = new HireRecordForm(Action.Read, Hirerecord);
         EntityBrowser  browser = new EntityBrowser(form);
         browser.FormType         = FormTypes.Browse;
         browser.MinHeight        = 500;
         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"));
         return;
     }
 }
Exemplo n.º 2
0
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            if (Hirerecord != null)
            {
                if (Hirerecord.HouseRecordObj.ISSETTLEMENT == "0")
                {
                    HireRecordForm form    = new HireRecordForm(Action.Edit, Hirerecord);
                    EntityBrowser  browser = new EntityBrowser(form);
                    browser.MinHeight        = 500;
                    browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                    browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
                }
                else
                {
                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("HIRERECORDISSETTLEMENT"));
                    return;
                }
            }
            else
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }


            //ObservableCollection<string> hireAppID = GridHelper.GetSelectItem(dgHireApp, "myChkBox", Action.Edit);
            //V_HireRecord RecordT = new V_HireRecord();

            //if (this.dgHireApp.ItemsSource != null)
            //{
            //    foreach (object obj in dgHireApp.ItemsSource)
            //    {
            //        if (dgHireApp.Columns[0].GetCellContent(obj) != null)
            //        {
            //            CheckBox cb1 = dgHireApp.Columns[0].GetCellContent(obj).FindName("myChkBox") as CheckBox; //cb为
            //            if (cb1.IsChecked == true)
            //            {
            //                RecordT = cb1.Tag as V_HireRecord;
            //                break;
            //            }
            //        }
            //    }

            //}

            //if (RecordT.HouseRecordObj == null )
            //{
            //    ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
            //}
            //else
            //{
            //    if (RecordT.HouseRecordObj.ISSETTLEMENT == "0")
            //    {
            //        HireRecordForm form = new HireRecordForm(Action.Edit, RecordT);
            //        EntityBrowser browser = new EntityBrowser(form);
            //        browser.MinHeight = 500;
            //        browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
            //        browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
            //    }
            //    else
            //    {
            //        Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("HIRERECORDISSETTLEMENT"));
            //        return;
            //    }
            //}
        }