private void PopulateItem(int _id) { T_Nhom _objSet = new T_Nhom(); HPCBusinessLogic.DAL.NhomDAL _groupDAL = new HPCBusinessLogic.DAL.NhomDAL(); _objSet = _groupDAL.GetOneFromT_NhomByID(_id); this.txtName.Text = _objSet.Ten_Nhom; this.txtDesc.Text = _objSet.MoTa; }
protected void linkSave_Click(object sender, EventArgs e) { #region GhiLog HPCBusinessLogic.Lichsu_Thaotac_HethongDAL actionDAL = new Lichsu_Thaotac_HethongDAL(); T_Lichsu_Thaotac_Hethong action = new T_Lichsu_Thaotac_Hethong(); action.Ma_Nguoidung = _user.UserID; action.TenDaydu = _user.UserName; action.HostIP = IpAddress(); action.NgayThaotac = DateTime.Now; #endregion this.Page.Validate(vs_Themmoi.ValidationGroup); if (!Page.IsValid) { return; } HPCBusinessLogic.DAL.NhomDAL _nhomnguoidungDAL = new HPCBusinessLogic.DAL.NhomDAL(); T_Nhom _nhomnguoidung = SetItem(); T_Nhom _isnhomnguoidung; int groupID = 0; if (Request["ID"] != null && Request["ID"].ToString() != "" && Request["ID"].ToString() != String.Empty) { groupID = int.Parse(Request["ID"].ToString()); } _isnhomnguoidung = _nhomnguoidungDAL.GetGroupName(_nhomnguoidung.Ten_Nhom, groupID); if (_isnhomnguoidung != null) { FuncAlert.AlertJS(this, CommonLib.ReadXML("lblNhomdatontai")); return; } int _return = _nhomnguoidungDAL.Insert_T_Group(_nhomnguoidung); if (Page.Request.Params["id"] == null) { action.Thaotac = "[Thêm mới Group]-->[Thao tác Thêm][ID:" + _return.ToString() + " ]"; } else { action.Thaotac = "[Sửa Group]-->[Thao tác Sửa][ID:" + Page.Request.Params["id"].ToString() + " ]"; } actionDAL.InserT_Lichsu_Thaotac_Hethong(action); }