예제 #1
0
 private void tsForRent_Click(object sender, EventArgs e)
 {
     CloseAllChildForm();
     frmRent fr = new frmRent();
     fr.MdiParent  =this;
     fr.Show();
 }
예제 #2
0
        private void trMain_AfterSelect(object sender, TreeViewEventArgs e)
        {
            switch (e.Node.Name)
            {
                case "ndRecive":
                    CloseAllChildForm();
                    /* รับสินค้า*/
                    frmRecive fRecive = new frmRecive();
                    fRecive.MdiParent = this;
                    fRecive.Show();
                    break;
                case "ndRent":
                    CloseAllChildForm();

                    /* ยืมสินค้า*/
                    frmRent fRent = new frmRent();
                    fRent.MdiParent = this;
                    fRent.Show();
                    break;
                case "ndReturn":
                    CloseAllChildForm();
                    /* คืนสินค้า */
                    frmReturn fReturn = new frmReturn();
                    fReturn.MdiParent = this;
                    fReturn.Show();
                    break;
                case "ndSent":
                    /* จ่ายสินค้า */
                    CloseAllChildForm();
                    frmSale fs = new frmSale();
                    fs.MdiParent = this;
                    fs.Show();
                    break;
                case "ndEditProduct":
                    /* แก้ไขสินค้า */
                    //CloseAllChildForm();
                    frmDefineProduct fd = new frmDefineProduct();
                    fd.ShowDialog();

                    break;
                case "ndEditCustomer":
                    /* แก้ไขลูกค้า */
                    CloseAllChildForm();
                    frmCustomer fc = new frmCustomer();
                    fc.MdiParent = this;
                    fc.Show();
                    break;
                case "ndEdit":
                    CloseAllChildForm();
                    /* แก้ไขผู้จัดจำหน่าย */
                    frmDefineSupiler fds = new frmDefineSupiler();
                    fds.MdiParent = this;
                    fds.Show();
                    break;

            }
        }