Example #1
0
 public void load()
 {
     InitializeComponent();
     Form s = new frmExtendHome();
     s.TopLevel = false;
     s.Visible = true;
     s.Padding = new Padding(0);
     s.Location = new Point(0, 0);
     pnlHome.Controls.Add(s);
     pnlHome.Size = new Size(pnlHome.Parent.Width - 6, pnlHome.Parent.Height - 21);
     s.Size = pnlHome.Size;
     //MessageBox.Show("----manv---:" + MaNV + "-");
     loadEmpolyeeUsingThisForm();
 }
Example #2
0
        private void btnFuntion_click(object sender, EventArgs e)
        {
            #region comment
            //form
            //if (((DevComponents.DotNetBar.ButtonX)sender).Text == "Trang chủ")
            //{
            //    Form s = new frmHome();
            //    s.TopLevel = false;
            //    s.Visible = true;
            //    s.Location = new Point(0, 0);
            //    AddForm(s, ((DevComponents.DotNetBar.ButtonX)sender).Text);
            //}

            //if(((DevComponents.DotNetBar.ButtonX)sender).Text== "Giới thiệu công ty")
            //{
            //    Form s = new frmIntroCompany();
            //    s.TopLevel = false;
            //    s.Visible = true;
            //    s.Location = new Point(0, 0);
            //    AddForm(s, ((DevComponents.DotNetBar.ButtonX)sender).Text);
            //}
            #endregion

            switch (((DevComponents.DotNetBar.ButtonX)sender).Text)
            {
                case "Trang chủ":
                    {
                        Form s = new frmExtendHome();
                        s.TopLevel = false;
                        s.Visible = true;
                        s.Location = new Point(0, 0);
                        AddForm(s, ((DevComponents.DotNetBar.ButtonX)sender).Text);
                        break;
                    }
                case "Giới thiệu công ty":
                    {
                        Form s = new frmExtendIntroCompany();
                        s.TopLevel = false;
                        s.Visible = true;
                        s.Location = new Point(0, 0);
                        AddForm(s, ((DevComponents.DotNetBar.ButtonX)sender).Text);
                        break;
                    }
                case "Hướng dẫn sử dụng phần mềm":
                    {
                        Form s = new frmExtendGuideSoft();
                        s.TopLevel = false;
                        s.Visible = true;
                        s.Location = new Point(0, 0);
                        AddForm(s, ((DevComponents.DotNetBar.ButtonX)sender).Text);
                        break;
                    }
                case "Tạo mới hóa đơn":
                    {
                        Form s = new Sales.frmAddBill(MaNV);
                        s.TopLevel = false;
                        s.Visible = true;
                        s.Location = new Point(0, 0);
                        AddForm(s, ((DevComponents.DotNetBar.ButtonX)sender).Text);
                        break;
                    }
                case "Thống kê doanh thu":
                    {
                        Form s = new Sales.frmReportSaleResult();
                        s.TopLevel = false;
                        s.Visible = true;
                        s.Location = new Point(0, 0);
                        AddForm(s, ((DevComponents.DotNetBar.ButtonX)sender).Text);
                        break;
                    }
                case "Quản lý sản phẩm":
                    {
                        Form s = new Warehouse.frmProduct();
                        s.TopLevel = false;
                        s.Visible = true;
                        s.Location = new Point(0, 0);
                        AddForm(s, ((DevComponents.DotNetBar.ButtonX)sender).Text);
                        break;
                    }
                case "Quản lý phiếu nhập kho":
                    {
                        Form s = new Warehouse.frmAddWarehouseBill(MaNV);
                        s.TopLevel = false;
                        s.Visible = true;
                        s.Location = new Point(0, 0);
                        AddForm(s, ((DevComponents.DotNetBar.ButtonX)sender).Text);
                        break;
                    }
                case "Thống kê phiếu nhập":
                    {
                        Form s = new Warehouse.frmWarehouseBill();
                        s.TopLevel = false;
                        s.Visible = true;
                        s.Location = new Point(0, 0);
                        AddForm(s, ((DevComponents.DotNetBar.ButtonX)sender).Text);
                        break;
                    }
                case "Thống kê sản phẩm":
                    {
                        Warehouse.ProductsReport rep = new ProductsReport();
                        rep.CreateDocument();
                        rep.ShowPreviewDialog( );
                        //frmProductsReport s = new Warehouse.frmProductsReport();
                        //s.documentViewer1.DocumentSource = rep;
                        //s.ShowDialog();
                        //s.TopLevel = false;
                        //s.Visible = true;s.Location = new Point(0, 0);
                        //AddForm(s, ((DevComponents.DotNetBar.ButtonX)sender).Text);
                        break;
                    }
                case "Tiếp nhận bảo hành":
                    {
                        Form s = new Guarantee.frmPhieuTiepNhanBaoHanh(MaNV);
                        s.TopLevel = false;
                        s.Visible = true;
                        s.Location = new Point(0, 0);
                        AddForm(s, ((DevComponents.DotNetBar.ButtonX)sender).Text);
                        break;
                    }
                case "Trả phiếu bảo hành":
                    {
                        Form s = new Guarantee.frmPhieuTraHangBaoHanh(MaNV);
                        s.TopLevel = false;
                        s.Visible = true;
                        s.Location = new Point(0, 0);
                        AddForm(s, ((DevComponents.DotNetBar.ButtonX)sender).Text);
                        break;
                    }
                case "Thống kê bảo hành":
                    {
                        Form s = new Guarantee.frmThongKeBaoHanh();
                        s.TopLevel = false;
                        s.Visible = true;
                        s.Location = new Point(0, 0);
                        AddForm(s, ((DevComponents.DotNetBar.ButtonX)sender).Text);
                        break;
                    }
                case "Chỉnh sửa thông tin cá nhân":
                    {
                        Form s = new frmInfoEmployee(MaNV);
                        s.TopLevel = false;
                        s.Visible = true;
                        s.Location = new Point(0, 0);
                        AddForm(s, ((DevComponents.DotNetBar.ButtonX)sender).Text);
                        break;
                    }
                case "Thiết lập tài khoản cho  nhân viên ":
                    {
                        Form s = new frmEmployee();
                        s.TopLevel = false;
                        s.Visible = true;
                        s.Location = new Point(0, 0);
                        AddForm(s, ((DevComponents.DotNetBar.ButtonX)sender).Text);
                        break;
                    }
                default: break;
            }



        }