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

                if (_Contract_Info == null)
                {
                    return;
                }

                //Contract_Info _Contract_Info1 = c_Contract_Controller.Contract_GetById(_Contract_Info.Contract_Id);

                View_Contract_Renter _View_Contract_Renter = new View_Contract_Renter();
                _View_Contract_Renter.Owner = Window.GetWindow(this);

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

                DataGridHelper.NVSFocus(dgrContract, c_row_select, 0);
            }
            catch (Exception ex)
            {
                CommonData.log.Error(ex.ToString());
            }
        }
Exemplo n.º 2
0
        void View_Contract()
        {
            try
            {
                c_row_select = dgrContract.SelectedIndex;
                Contract_Info _Contract_Info = (Contract_Info)dgrContract.SelectedItem;

                if (_Contract_Info == null)
                {
                    return;
                }
                if (_Contract_Info.Contract_Type == (decimal)Enum_Contract_Type.Renter)
                {
                    View_Contract_Renter _View_Contract_Renter = new View_Contract_Renter();
                    _View_Contract_Renter.Owner = Window.GetWindow(this);

                    _View_Contract_Renter.c_Contract_Info = _Contract_Info;
                    _View_Contract_Renter.ShowDialog();
                }
                else
                {
                    View_Contract_Tenant _View_Contract_Tenant = new View_Contract_Tenant();
                    _View_Contract_Tenant.Owner = Window.GetWindow(this);

                    _View_Contract_Tenant.c_Contract_Info = _Contract_Info;
                    _View_Contract_Tenant.ShowDialog();
                }
                DataGridHelper.NVSFocus(dgrContract, c_row_select, 0);
            }
            catch (Exception ex)
            {
                CommonData.log.Error(ex.ToString());
            }
        }