private void radButton1_Click(object sender, EventArgs e)
 {
     AddPayments adp = new AddPayments();
     adp.Show();
 }
Exemplo n.º 2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            if (txtInvoiceNo.Text != "" && txtCustomerName.Text != "" && grdInvoice.RowCount != 0 && txtInvoiceNote.Text !="")//if customerNo is not null
                {
                    if (MessageBox.Show("Do you want to add invoice?", "Message", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                    {
                      //  if (MessageBox.Show("Do you want to print invoice?", "Message", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                       // {

                        setUserDetailsInGloble();
                        add();
                        clear_all();
                        vehical_category_data.total = 0;
                        this.Enabled = false;

                        GlobleAccess.openType = "I";
                        AddPayments a = new AddPayments();
                        //a.MdiParent = DHNAULA.ActiveForm;
                        a.Size = new System.Drawing.Size(1100, 670);
                        a.Location = new System.Drawing.Point(152, 30);
                        a.Show();

                          //  print();
                           // btnAddPayment.Visible = true;

                           // AddPayments a = new AddPayments();
                           // a.Size = new System.Drawing.Size(820, 400);
                            //a.Location = new System.Drawing.Point(330, 50);
                            //a.ShowDialog();

                            //loadInvoiceNo();

                       // }
                       // else
                       // {
                            /*setUserDetailsInGloble();
                            add();
                            clear_all();
                            vehical_category_data.total = 0;
                            this.Enabled = false;
                            CurrentInvoicePrint ci = new CurrentInvoicePrint();
                            ci.Show();
                            //btnAddPayment.Visible = true;

                            GlobleAccess.openType = "I";
                            AddPayments a = new AddPayments();
                           // a.MdiParent = DHNAULA.ActiveForm;
                            a.Size = new System.Drawing.Size(1100, 670);
                            a.Location = new System.Drawing.Point(152, 30);
                            a.ShowDialog();*/
                           // loadInvoiceNo();
                        //}

                    }
                    else
                    {

                    }

            }
                else // if  invoice number Exists
                {
                    MessageBox.Show("Invalid operation!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
        }
 private void radButton4_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms["AddPayments"] == null)
     {
         AddPayments a = new AddPayments();
         a.MdiParent = DHNAULA.ActiveForm;
         a.Size = new System.Drawing.Size(820, 400);
         a.Location = new System.Drawing.Point(330, 50);
         a.Show();
     }
 }
 private void pictureBox7_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms["AddPayments"] == null)
     {
         GlobleAccess.openType = "M";
         AddPayments a = new AddPayments();
         a.MdiParent = this;
         a.Size = new System.Drawing.Size(1100, 1000);
         a.Location = new System.Drawing.Point(5, 5);
         a.Show();
     }
 }