Пример #1
0
 void BtnView_Click(object sender, RoutedEventArgs e)
 {
     if (Househireapp != null)
     { 
         HouseHireAppForm form = new HouseHireAppForm(Action.Read, Househireapp.houseAppObj.HIREAPPID, checkState, "0");
         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;
     }
 }
Пример #2
0
        /// <summary>
        /// 入住
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FrmHouseComein_Click(object sender, RoutedEventArgs e)
        {

            if (Househireapp != null)
            {
                
                if (Househireapp.houseAppObj.ISOK == "1")
                {
                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("THEHOUSEISCOMEIN"));
                    return;
                }
                else
                {
                    string Result = "";
                    SMT.SaaS.FrameworkUI.ChildWidow.ComfirmWindow com = new SMT.SaaS.FrameworkUI.ChildWidow.ComfirmWindow();
                    com.OnSelectionBoxClosed += (obj, result1) =>
                    {
                        //添加租赁记录并将,出租申请的标志改为确定入住
                        HouseHireAppForm form = new HouseHireAppForm(Action.Edit, Househireapp.houseAppObj.HIREAPPID, checkState, "1");
                        EntityBrowser browser = new EntityBrowser(form);
                        browser.MinHeight = 500;
                        browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                        browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);


                    };
                    com.SelectionBox(Utility.GetResourceStr("COMEINHOUSECONFIRM"), Utility.GetResourceStr("COMEINHOUSEALTER"), SMT.SaaS.FrameworkUI.ChildWidow.ComfirmWindow.titlename, Result);
                }

                


            }
            else
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "COMEINHIREHOUSE"), Utility.GetResourceStr("CONFIRMBUTTON"));
            }


            //T_OA_HIREAPP HireAppT = new T_OA_HIREAPP();
            //V_HouseHireApp vApp = new V_HouseHireApp();
            //if (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)
            //            {
            //                vApp = cb1.Tag as V_HouseHireApp;
            //                HireAppT = vApp.houseAppObj;
            //                break;
            //            }
            //        }
            //    }

            //}
            
            //if (!string.IsNullOrEmpty(HireAppT.HIREAPPID))
            //{
            //    if (HireAppT.ISOK == "1")
            //    {
            //        Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("THEHOUSEISCOMEIN"));
            //        return;
            //    }
            //    else
            //    {
            //        string Result = "";
            //        SMT.SaaS.FrameworkUI.ChildWidow.ComfirmWindow com = new SMT.SaaS.FrameworkUI.ChildWidow.ComfirmWindow();
            //        com.OnSelectionBoxClosed += (obj, result1) =>
            //        {
            //            //添加租赁记录并将,出租申请的标志改为确定入住
            //            HouseHireAppForm form = new HouseHireAppForm(Action.Edit, HireAppT.HIREAPPID, checkState, "1");
            //            EntityBrowser browser = new EntityBrowser(form);
            //            browser.MinHeight = 500;
            //            browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
            //            browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);


            //        };
            //        com.SelectionBox(Utility.GetResourceStr("COMEINHOUSECONFIRM"), Utility.GetResourceStr("COMEINHOUSEALTER"), SMT.SaaS.FrameworkUI.ChildWidow.ComfirmWindow.titlename, Result);
            //    }

                                
            //}
            //else
            //{

            //    ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "COMEINHIREHOUSE"), Utility.GetResourceStr("CONFIRMBUTTON"));
            //}
        }
Пример #3
0
        /// <summary>
        /// 退房
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FrmHouseInfoManagement_Click(object sender, RoutedEventArgs e)
        {

            if (Househireapp != null)
            {
                if (Househireapp.houseAppObj.ISOK == "0")
                {
                    //没有入住不能进行退房操作
                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("NOCOMEINCANNOTCHECKOUT"));
                    return;
                }
                else
                {
                    if (Househireapp.houseAppObj.ISBACK == "1")
                    {
                        Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("THEHOUSEISBACK"));
                        return;
                    }
                    else
                    {

                        string Result = "";
                        SMT.SaaS.FrameworkUI.ChildWidow.ComfirmWindow com = new SMT.SaaS.FrameworkUI.ChildWidow.ComfirmWindow();
                        com.OnSelectionBoxClosed += (obj, result1) =>
                        {
                            HouseHireAppForm form = new HouseHireAppForm(Action.Return, Househireapp.houseAppObj.HIREAPPID, checkState, "2");
                            EntityBrowser browser = new EntityBrowser(form);

                            browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                            browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });

                        };
                        com.SelectionBox(Utility.GetResourceStr("OUTHOUSECONFIRM"), Utility.GetResourceStr("OUTHOUSEALTER"), SMT.SaaS.FrameworkUI.ChildWidow.ComfirmWindow.titlename, Result);

                    }

                }
                

            }
            else
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "CHECKOUTHIRE"), Utility.GetResourceStr("CONFIRMBUTTON"));
            }

            //if (dgHireApp.SelectedItems.Count > 0)
            //{

            //    string Result = "";
            //    houseDelID = new ObservableCollection<string>();
                
            //}
            //else
            //{
            //    ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRMBUTTON"));
            //}


            ////ObservableCollection<string> hireAppID = GridHelper.GetSelectItem(dgHireApp, "myChkBox", Action.Edit);
            //T_OA_HIREAPP HireAppT = new T_OA_HIREAPP();
            //V_HouseHireApp vApp = new V_HouseHireApp();
            //if (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)
            //            {
            //                vApp = cb1.Tag as V_HouseHireApp;
            //                HireAppT = vApp.houseAppObj;
            //                break;
            //            }
            //        }
            //    }

            //}
            //if (!string.IsNullOrEmpty(HireAppT.HIREAPPID))
            //{
            //    if (HireAppT.ISOK == "0")
            //    {
            //        //没有入住不能进行退房操作
            //        Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("NOCOMEINCANNOTCHECKOUT"));
            //        return;
            //    }
            //    else
            //    {
            //        if (HireAppT.ISBACK == "1")
            //        {
            //            Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("THEHOUSEISBACK"));
            //            return;
            //        }
            //        else
            //        {

            //            string Result = "";
            //            SMT.SaaS.FrameworkUI.ChildWidow.ComfirmWindow com = new SMT.SaaS.FrameworkUI.ChildWidow.ComfirmWindow();
            //            com.OnSelectionBoxClosed += (obj, result1) =>
            //            {
            //                HouseHireAppForm form = new HouseHireAppForm(Action.Return, HireAppT.HIREAPPID, checkState, "2");
            //                EntityBrowser browser = new EntityBrowser(form);

            //                browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
            //                browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { });

            //            };
            //            com.SelectionBox(Utility.GetResourceStr("OUTHOUSECONFIRM"), Utility.GetResourceStr("OUTHOUSEALTER"), SMT.SaaS.FrameworkUI.ChildWidow.ComfirmWindow.titlename, Result);

            //        }
            //    }
            //}
            //else
            //{
                
            //    ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "CHECKOUTHIRE"), Utility.GetResourceStr("CONFIRMBUTTON"));
            //}
        }
Пример #4
0
 private void btnNew_Click(object sender, RoutedEventArgs e)
 {
     HouseHireAppForm form = new HouseHireAppForm(Action.Add, null,checkState,"0");
     EntityBrowser browser = new EntityBrowser(form);
     browser.MinHeight = 500;
     browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
     browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
 }
Пример #5
0
        private void btnAudit_Click(object sender, RoutedEventArgs e)
        {
            ObservableCollection<string> hireAppID = GridHelper.GetSelectItem(dgHireApp, "myChkBox", Action.Edit);
            if (hireAppID == null || hireAppID.Count == 0)
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "AUDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
            }
            else
            {

                HouseHireAppForm form = new HouseHireAppForm(Action.AUDIT, hireAppID[0], checkState,"0");
                EntityBrowser browser = new EntityBrowser(form);
                browser.MinHeight = 500;
                browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
            }
        }
Пример #6
0
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {

            if (Househireapp != null)
            {
                if (Househireapp.houseAppObj.CHECKSTATE == "0" || Househireapp.houseAppObj.CHECKSTATE == "3")
                {
                    HouseHireAppForm form = new HouseHireAppForm(Action.Edit, Househireapp.houseAppObj.HIREAPPID, checkState, "0");
                    EntityBrowser browser = new EntityBrowser(form);
                    browser.FormType = FormTypes.Edit;
                    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("CAUTION"), Utility.GetResourceStr("HOUSEAPPNOTEDIT"));
                }
            }
            else
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
                return;
            }

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

            //if (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)
            //            {
            //                HireAppT = cb1.Tag as V_HouseHireApp;
            //                hireAppID = HireAppT.houseAppObj.HIREAPPID;
            //                break;
            //            }
            //        }
            //    }

            //}
            //if (string.IsNullOrEmpty(hireAppID))
            //{
            //    ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
            //}
            //else
            //{

            //    HouseHireAppForm form = new HouseHireAppForm(Action.Edit, hireAppID, checkState, "0");
            //    EntityBrowser browser = new EntityBrowser(form);
            //    browser.MinHeight = 500;
            //    browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
            //    browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
            //}
        }