Ejemplo n.º 1
0
        void Contract_Update()
        {
            try
            {
                c_row_select = dgrContract.SelectedIndex;
                Contract_Info _Contract_Info = (Contract_Info)dgrContract.SelectedItem;

                if (_Contract_Info == null)
                {
                    return;
                }
                Update_Contract_Tenant _Update_Contract_Insert_Tenant = new Update_Contract_Tenant();
                _Update_Contract_Insert_Tenant.c_Contract_Info = _Contract_Info;
                _Update_Contract_Insert_Tenant.Owner           = Window.GetWindow(this);
                _Update_Contract_Insert_Tenant.ShowDialog();

                if (_Update_Contract_Insert_Tenant.c_id_insert != 0)
                {
                    Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;

                    LoadData(true);
                    DBMemory.LoadFeeTenant();

                    Mouse.OverrideCursor = null;
                }

                DataGridHelper.NVSFocus(dgrContract, c_row_select, 0);
            }
            catch (Exception ex)
            {
                Mouse.OverrideCursor = null;
                CommonData.log.Error(ex.ToString());
            }
        }
Ejemplo n.º 2
0
        void Insert_Contract_Tenant()
        {
            try
            {
                Contract_Insert_Tenant _Contract_Insert_Tenant = new Contract_Insert_Tenant();
                _Contract_Insert_Tenant.Owner = Window.GetWindow(this);
                _Contract_Insert_Tenant.ShowDialog();

                if (_Contract_Insert_Tenant.c_id_insert != 0)
                {
                    Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;

                    Search();

                    DBMemory.LoadFeeTenant();

                    for (int i = 0; i < c_lst.Count; i++)
                    {
                        Contract_Info ui = (Contract_Info)c_lst[i];
                        if (ui.Contract_Id == _Contract_Insert_Tenant.c_id_insert)
                        {
                            c_row_select = i;
                            _Contract_Insert_Tenant.c_id_insert = 0;
                            break;
                        }
                    }
                }

                Mouse.OverrideCursor = null;
                DataGridHelper.NVSFocus(dgrContract, c_row_select, 0);
            }
            catch (Exception ex)
            {
                Mouse.OverrideCursor = null;
                CommonData.log.Error(ex.ToString());
            }
        }
Ejemplo n.º 3
0
        void Payment_Contract()
        {
            try
            {
                c_row_select = dgrContract.SelectedIndex;
                Contract_Info _Contract_Info = (Contract_Info)dgrContract.SelectedItem;

                if (_Contract_Info == null)
                {
                    return;
                }

                Tenant_Payment _Tenant_Payment = new Tenant_Payment();
                _Tenant_Payment.Owner = Window.GetWindow(this);

                _Tenant_Payment.c_Contract_Info = _Contract_Info;
                _Tenant_Payment.ShowDialog();

                if (_Tenant_Payment.c_ok == true)
                {
                    Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;

                    Search();

                    DBMemory.LoadFeeTenant();

                    Mouse.OverrideCursor = null;
                }

                DataGridHelper.NVSFocus(dgrContract, c_row_select, 0);
            }
            catch (Exception ex)
            {
                CommonData.log.Error(ex.ToString());
            }
        }