Ejemplo n.º 1
0
        private void frmTextPhong_FormClosing(object sender, FormClosingEventArgs e)
        {
            Phong_WCFClient p_wcf = new Phong_WCFClient();

            frmQLP.Loading_DSP(frmQLP.DataTable_DSP(p_wcf.GetPhongs().ToList()));
            frmQLP.Custom_DataGridView(frmQLP.dgv_DSPhong);
        }
Ejemplo n.º 2
0
        private void btnXoa_Click(object sender, EventArgs e)
        {
            if (dgv_DSPhong.SelectedRows.Count == 0)
            {
                return;
            }
            DialogResult dr = MessageBox.Show("Bạn Có Muốn Xóa ?", "XÓA PHÒNG", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (dr == DialogResult.Yes)
            {
                if (dgv_DSPhong.SelectedRows.Count >= 1)
                {
                    Phong_WCFClient p_wcf;

                    for (int i = 0; i < dgv_DSPhong.SelectedRows.Count; i++)
                    {
                        string id = dgv_DSPhong.SelectedRows[i].Cells[0].Value.ToString().Trim();
                        p_wcf = new Phong_WCFClient();
                        if (!p_wcf.XoaPhong(id))
                        {
                            break;
                        }
                    }
                    p_wcf = new Phong_WCFClient();
                    Loading_DSP(DataTable_DSP(p_wcf.GetPhongs().ToList()));
                    Custom_DataGridView(dgv_DSPhong);
                }
            }
            else
            {
                return;
            }
        }
Ejemplo n.º 3
0
        private void frmQuanLyPhong_Load(object sender, EventArgs e)
        {
            btnReload.Image = imgs_Button.Images[0];
            Phong_WCFClient  p_wcf = new Phong_WCFClient();
            List <Phong_Ent> dsP   = p_wcf.GetPhongs().ToList();

            Loading_DSP(DataTable_DSP(dsP));
            Custom_DataGridView(dgv_DSPhong);
        }
Ejemplo n.º 4
0
        private void btnReload_Click(object sender, EventArgs e)
        {
            cbx_Tang.SelectedIndex      = 0;
            cbx_TinhTrang.SelectedIndex = 0;
            cbx_LoaiPhong.SelectedIndex = 0;
            txtTimKiem.Clear();
            Phong_WCFClient  p_wcf = new Phong_WCFClient();
            List <Phong_Ent> dsP   = p_wcf.GetPhongs().ToList();

            Loading_DSP(DataTable_DSP(dsP));
            Custom_DataGridView(dgv_DSPhong);
        }