Exemplo n.º 1
0
        // Token: 0x060000E6 RID: 230 RVA: 0x000156D8 File Offset: 0x000138D8
        private void btnAddNew_Click(object sender, EventArgs e)
        {
            bool flag = this.strTitle.Equals("Bảng giá");

            if (flag)
            {
                foreach (object obj in Application.OpenForms)
                {
                    Form form  = (Form)obj;
                    bool flag2 = form is frmAddNew;
                    if (flag2)
                    {
                        form.Show();
                        return;
                    }
                }
                frmAddNew frmAddNew = new frmAddNew(" - THÊM MỚI", string.Empty);
                frmAddNew.ShowDialog();
                this.LoadBangGiaDichVu(CMConstant.strFilePathBangGiaDichVu);
            }
            else
            {
                bool flag3 = this.strTitle.Equals("Loại phòng");
                if (flag3)
                {
                    foreach (object obj2 in Application.OpenForms)
                    {
                        Form form2 = (Form)obj2;
                        bool flag4 = form2 is frmRoomType;
                        if (flag4)
                        {
                            form2.Show();
                            return;
                        }
                    }
                    frmRoomType frmRoomType = new frmRoomType(" - THÊM MỚI", string.Empty);
                    frmRoomType.ShowDialog();
                    this.LoadRoomType();
                }
            }
        }
Exemplo n.º 2
0
        // Token: 0x060000E7 RID: 231 RVA: 0x00015830 File Offset: 0x00013A30
        private void btnEdit_Click(object sender, EventArgs e)
        {
            bool flag = this.strTitle.Equals("Bảng giá");

            if (flag)
            {
                this.ContextMenuStrip = this.contextMenuStrip1;
                ListViewItem listViewItem = new ListViewItem();
                listViewItem = this.funcCommon.GetItemListView(this.lstViewMenu);
                bool flag2 = listViewItem == null;
                if (flag2)
                {
                    this.ContextMenuStrip = null;
                    this.funcCommon.Msg("Vui lòng chọn 1 loại phòng.", "Lỗi");
                }
                else
                {
                    foreach (object obj in Application.OpenForms)
                    {
                        Form form  = (Form)obj;
                        bool flag3 = form is frmAddNew;
                        if (flag3)
                        {
                            form.Show();
                            return;
                        }
                    }
                    frmAddNew frmAddNew = new frmAddNew(" - CHỈNH SỬA", listViewItem.Text);
                    frmAddNew.ShowDialog();
                    this.LoadBangGiaDichVu(CMConstant.strFilePathBangGiaDichVu);
                }
            }
            else
            {
                bool flag4 = this.strTitle.Equals("Loại phòng");
                if (flag4)
                {
                    this.ContextMenuStrip = this.contextMenuStrip1;
                    ListViewItem listViewItem2 = new ListViewItem();
                    listViewItem2 = this.funcCommon.GetItemListView(this.lstViewMenu);
                    bool flag5 = listViewItem2 == null;
                    if (flag5)
                    {
                        this.ContextMenuStrip = null;
                        this.funcCommon.Msg("Vui lòng chọn 1 loại phòng.", "Lỗi");
                    }
                    else
                    {
                        foreach (object obj2 in Application.OpenForms)
                        {
                            Form form2 = (Form)obj2;
                            bool flag6 = form2 is frmRoomType;
                            if (flag6)
                            {
                                form2.ShowDialog();
                                this.LoadRoomType();
                                return;
                            }
                        }
                        frmRoomType frmRoomType = new frmRoomType(" - CHỈNH SỬA", listViewItem2.Text);
                        frmRoomType.ShowDialog();
                        this.LoadRoomType();
                    }
                }
            }
        }