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(); }
public void LoadTreeNguonDan() { NguonTuyenDungController nguontuyendungcontroller = new NguonTuyenDungController(); List <DAL.KenhTuyenDung> data = nguontuyendungcontroller.GetByAll(); foreach (var item in data) { Ext.Net.MenuItem menuitem = new Ext.Net.MenuItem(); mnuNguonTuyenDung.Items.Add(menuitem); menuitem.Text = item.Name; menuitem.Listeners.Click.Handler = "addTab(TabPanel1,'" + item.ID + "','" + item.LinkUrl + "','" + item.Name + "');"; } }
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(); } }