Ejemplo n.º 1
0
        private void btnUpdate_Click(object sender, RoutedEventArgs e)
        {
            frmAccount frm = new frmAccount();

            frm.txtPkid.Text          = txtPkid.Text;
            frm.txtAccNo.Text         = txtAccNo.Text;
            frm.txtAccName.Text       = txtAccName.Text;
            frm.txtAccNote.Text       = txtAccNote.Text;
            frm.txtLevel.Text         = (Convert.ToInt32(txtLevel.Text)).ToString();
            frm.txtParentId.Text      = txtParentId.Text;
            frm.txtParentAccName.Text = txtAccParentName.Text;
            frm.txtParentAccNo.Text   = txtParentAccNo.Text;

            frm.ShowDialog();
            FillAccountTree();
        }
Ejemplo n.º 2
0
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            frmAccount frm = new frmAccount();

            frm.txtPkid.Text = "";
            if (txtLevel.Text != "3")
            {
                frm.txtLevel.Text         = (Convert.ToInt32(txtLevel.Text) + 1).ToString();
                frm.txtParentId.Text      = txtPkid.Text;
                frm.txtParentAccName.Text = txtAccName.Text;
                frm.txtParentAccNo.Text   = txtAccNo.Text;
            }
            else
            {
                frm.txtLevel.Text         = (Convert.ToInt32(txtLevel.Text)).ToString();
                frm.txtParentId.Text      = txtParentId.Text;
                frm.txtParentAccName.Text = txtAccParentName.Text;
                frm.txtParentAccNo.Text   = txtParentAccNo.Text;
            }


            frm.ShowDialog();
            btnNew_Click(null, null);
        }