Exemplo n.º 1
0
        private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
        {
            var frm = new AddNewCompany(_companyType);
            frm.ShowDialog();

            _uniDb.Refresh(System.Data.Linq.RefreshMode.KeepChanges, _pagination.PageData);
            BindGridView();
            BindControls();
        }
Exemplo n.º 2
0
        private void bindingNavigatorEditItem_Click(object sender, EventArgs e)
        {
            var srNos = GetSelectedSrNo();
            if (!srNos.Any())
                return;

            var srNo = srNos[0];

            // ask for password
            Loginfrm frmLogin = new Loginfrm(HomePage.UserDetail);
            frmLogin.ShowDialog();

            if (!frmLogin.IsLogedIn)
                return;

            var frm = new AddNewCompany(srNo, _companyType);
            frm.ShowDialog();

            _uniDb.Refresh(System.Data.Linq.RefreshMode.KeepChanges, _pagination.PageData);
            BindGridView();
            BindControls();
        }