public void grdList_EditCommand(object source, DataGridCommandEventArgs e)
 {
     #region GhiLog
     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.UserFullName;
     action.HostIP       = IpAddress();
     action.NgayThaotac  = DateTime.Now;
     #endregion
     HPCBusinessLogic.DAL.YeucauDAL objDAL = new HPCBusinessLogic.DAL.YeucauDAL();
     if (e.CommandArgument.ToString().ToLower() == "edit")
     {
         int cusID = Convert.ToInt32(this.grdList.DataKeys[e.Item.ItemIndex].ToString());
         Response.Redirect("~/Phathanh/YeucauPHEdit.aspx?Menu_ID=" + Page.Request["Menu_ID"].ToString() + "&ID=" + cusID);
     }
     if (e.CommandArgument.ToString().ToLower() == "isstatus")
     {
         double _ID    = Convert.ToDouble(this.grdList.DataKeys[e.Item.ItemIndex].ToString());
         Int16  _check = objDAL.GetOneFromT_YeuCauByID(_ID).Trangthai;
         if (_check == 0)
         {
             objDAL.UpdateinfoT_Yeucau(" [Trangthai] = 1 where ID = " + _ID.ToString());
             action.Thaotac = "[Cập nhật trạng thái bảng T_Yeucau][ID:" + _ID.ToString() + " ][Trangthai = 1]";
             Danhsach_Yeucau();
         }
         if (_check == 1)
         {
             bool _bool;
             _bool = IsHopdongExsits(Convert.ToInt32(this.grdList.DataKeys[e.Item.ItemIndex].ToString()));
             if (_bool == false)
             {
                 objDAL.UpdateinfoT_Yeucau(" [Trangthai] = 0 where ID = " + _ID.ToString());
                 action.Thaotac = "[Cập nhật trạng thái bảng T_Yeucau][ID:" + _ID.ToString() + " ][Trangthai = 0]";
             }
             else
             {
                 System.Web.UI.ScriptManager.RegisterStartupScript(this, typeof(string), "Message", "alert('Yêu cầu này đã làm hợp đồng!');", true);
                 return;
             }
             Danhsach_Yeucau();
         }
     }
     if (e.CommandArgument.ToString().ToLower() == "delete")
     {
         bool _bool;
         _bool = IsHopdongExsits(Convert.ToInt32(this.grdList.DataKeys[e.Item.ItemIndex].ToString()));
         if (_bool == false)
         {
             objDAL.DeleteFromT_YeuCauQCByID(Convert.ToInt32(this.grdList.DataKeys[e.Item.ItemIndex].ToString()));
             action.Thaotac = "[Thao tác Xóa Trong Bảng T_Yeucau][ID:" + this.grdList.DataKeys[e.Item.ItemIndex].ToString() + " ]";
             Danhsach_Yeucau();
         }
         else
         {
             return;
         }
     }
 }