protected void Click_Event(object sender, DirectEventArgs e)
    {
        NguonTuyenDungController item = new NguonTuyenDungController();

        DAL.KenhTuyenDung data = item.GetByID(int.Parse("0" + hdfRecordID.Text));
        txt_GhiChu.Text    = "" + data.Description;
        txt_LinkNguon.Text = "" + data.LinkUrl;
        txtTenNguon.Text   = "" + data.Name;
        hdfRecordID.Text   = data.ID.ToString();

        wdNguonTuyenDung.Show();
    }
    protected void btnUpdate_Click(object sender, DirectEventArgs e)
    {
        NguonTuyenDungController item = new NguonTuyenDungController();
        int selectID = int.Parse("0" + hdfRecordID.Text);

        DAL.KenhTuyenDung data = new DAL.KenhTuyenDung()
        {
            Name        = txtTenNguon.Text,
            LinkUrl     = txt_LinkNguon.Text,
            Description = txt_GhiChu.Text
        };

        if (e.ExtraParams["Command"] == "Update")
        {
            data.ID = selectID;
            item.Update(data);
            RM.RegisterClientScriptBlock("rl", "#{Store1}.reload();");
            wdNguonTuyenDung.Hide();

            Dialog.ShowNotification("Sửa thành công");
        }
        else
        {
            item.Insert(data);
            RM.RegisterClientScriptBlock("reset", "resetForm();");
            RM.RegisterClientScriptBlock("rl123", "#{Store1}.reload();");
            Dialog.ShowNotification("Thêm thành công");
        }
        gpTuyenDung.Reload();


        if (e.ExtraParams["Close"] == "True")
        {
            wdNguonTuyenDung.Hide();
        }
    }