Beispiel #1
0
 public Group(Accountentry accountentry, TabControl tabControl, Master master, string activecontroal)
 {
     // TODO: Complete member initialization
     InitializeComponent();
     this.accountentry = accountentry;
     this.tabControl   = tabControl;
     this.master       = master;
     flagforbind       = 1;
     pvc = activecontroal;
 }
Beispiel #2
0
 public Customertype(Accountentry accountentry, TabControl tabControl, Master master, string activecontroal)
 {
     // TODO: Complete member initialization
     InitializeComponent();
     this.accountentry = accountentry;
     this.tabControl   = tabControl;
     this.master       = master;
     a   = 1;
     pvc = activecontroal;
 }
Beispiel #3
0
        private void btnAddAccount_Click(object sender, EventArgs e)
        {
            var privouscontroal = cmbaccountName;

            activecontroal = privouscontroal.Name;
            Accountentry client = new Accountentry(this, master, tabControl, activecontroal);

            client.Passed(1);
            //   client.Show();
            master.AddNewTab(client);
        }
Beispiel #4
0
        private void cmbaccountName_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                //for (int j = 0; j < lvserial.Items.Count; j++)
                //{
                //    if (lvserial.Items[j].ToString() == aname && lvserial.Items[j].ToString() == drcr)
                //    {
                //        //  DO NOT FILL
                //        MessageBox.Show("Same Account Cannot be Debited And Credited in a Single Voucher.");
                //    }
                //}
                e.SuppressKeyPress = true; // This will eliminate the beeping
                bool inList = false;
                for (int i = 0; i < cmbaccountName.Items.Count; i++)
                {
                    s = cmbaccountName.GetItemText(cmbaccountName.Items[i]);
                    if (s == cmbaccountName.Text)
                    {
                        inList = true;
                        cmbaccountName.Text = s;
                        break;
                    }
                }
                if (!inList)
                {
                    cmbaccountName.Text = "";
                }

                txtAmount.Focus();
            }
            if (e.KeyCode == Keys.F3)
            {
                var privouscontroal = cmbaccountName;
                activecontroal = privouscontroal.Name;
                Accountentry client = new Accountentry(this, master, tabControl, activecontroal);

                client.Passed(1);
                //   client.Show();
                master.AddNewTab(client);
            }
            if (e.KeyCode == Keys.F2)
            {
                var privouscontroal = cmbaccountName;
                activecontroal = privouscontroal.Name;
                string iid = cmbaccountName.SelectedValue.ToString();

                Accountentry client = new Accountentry(this, master, tabControl, activecontroal);
                client.Update(1, iid);
                client.Passed(1);
                //  client.Show();
                master.AddNewTab(client);
            }
        }
Beispiel #5
0
 private void btnnew_Click(object sender, EventArgs e)
 {
     try
     {
         Accountentry dlg = new Accountentry(master, tabControl);
         master.AddNewTab(dlg);
         dlg.Show();
     }
     catch (Exception ex)
     {
         //  MessageBox.Show("Error: " + ex.Message);
     }
 }
Beispiel #6
0
        private void cmbagentname_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                e.SuppressKeyPress = true; // This will eliminate the beeping
                bool inList = false;
                for (int i = 0; i < cmbagentname.Items.Count; i++)
                {
                    s = cmbagentname.GetItemText(cmbagentname.Items[i]);
                    if (s == cmbagentname.Text)
                    {
                        inList            = true;
                        cmbagentname.Text = s;
                        break;
                    }
                }
                if (!inList)
                {
                    cmbagentname.Text = "";
                }
                txtcommission.Focus();
            }
            if (e.KeyCode == Keys.F3)
            {
                var privouscontroal = cmbagentname;
                activecontroal = privouscontroal.Name;
                Accountentry client = new Accountentry(this, master, tabControl, activecontroal);

                client.Passed(1);
                //   client.Show();
                master.AddNewTab(client);
            }
            if (e.KeyCode == Keys.F2)
            {
                var privouscontroal = cmbagentname;
                activecontroal = privouscontroal.Name;
                string iid = cmbagentname.SelectedValue.ToString();

                Accountentry client = new Accountentry(this, master, tabControl, activecontroal);
                client.Update(1, iid);
                client.Passed(1);
                //  client.Show();
                master.AddNewTab(client);
            }
        }
Beispiel #7
0
 private void btnAccountEdit_Click(object sender, EventArgs e)
 {
     if (cmbaccountName.Text != "" && cmbaccountName.Text != null)
     {
         var privouscontroal = cmbaccountName;
         activecontroal = privouscontroal.Name;
         string       iid    = cmbaccountName.SelectedValue.ToString();
         Accountentry client = new Accountentry(this, master, tabControl, activecontroal);
         client.Update(1, iid);
         client.Passed(1);
         //  client.Show();
         master.AddNewTab(client);
     }
     else
     {
         MessageBox.Show("Please Select Account Name.");
     }
 }
Beispiel #8
0
        public void open()
        {
            try
            {
                this.Enabled = false;
                iid          = LVclient.Items[LVclient.FocusedItem.Index].SubItems[1].Text;

                Accountentry dlg = new Accountentry(master, tabControl);


                dlg.Update(1, iid);
                master.AddNewTab(dlg);
                // dlg.Show();
            }
            finally
            {
                this.Enabled = true;
            }
        }
Beispiel #9
0
        private void cmbcustname_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                if (cmbCustName.Text != "")
                {
                    cmbPurchaseType.Focus();
                }
                else
                {
                    MessageBox.Show("Please Select Customer");
                    cmbCustName.Focus();
                }
            }
            if (e.KeyCode == Keys.F3)
            {
                Accountentry client = new Accountentry(this);

                client.Passed(1);
                client.Show();
            }
        }