Пример #1
0
        protected void GVDoituong_RowDeleting(object sender, GridViewDeleteEventArgs 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

            int         _id    = Convert.ToInt32(GVDoituong.DataKeys[e.RowIndex].Values["ID"].ToString());
            DoituongDAL _dtDAL = new DoituongDAL();
            if (_dtDAL.CheckExists_Madoituong(_id, 1) == 1)
            {
                return;
            }
            else
            {
                _dtDAL.DeleteOneFromT_Doituong(_id);
                lblMessError.Text = "";
                action.Thaotac    = "[Xóa đối tượng]-->[Mã đối tượng:" + _id.ToString() + " ]";
                actionDAL.InserT_Lichsu_Thaotac_Hethong(action);
            }
            BindList_Doituong();
            BinQuytrinhtheoAnPham();

            UltilFunc.RunJavaScriptCode("$.fx.speeds._default = 10; var dlg = jQuery('#dialog').dialog({draggable: true,  resizable: true, hide: 'scale', modal: true, width: 500 }); dlg.parent().appendTo(jQuery('form:first'));");
        }
Пример #2
0
        protected void GVDoituong_RowDeleting(object sender, GridViewDeleteEventArgs 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

            int         _id    = Convert.ToInt32(GVDoituong.DataKeys[e.RowIndex].Values["ID"].ToString());
            DoituongDAL _dtDAL = new DoituongDAL();
            if (_dtDAL.CheckExists_Madoituong(_id, 1) == 1)
            {
                return;
            }
            else
            {
                _dtDAL.DeleteOneFromT_Doituong(_id);
                action.Thaotac = "[Xóa đối tượng]-->[Mã đối tượng:" + _id.ToString() + " ]";
                actionDAL.InserT_Lichsu_Thaotac_Hethong(action);
            }
            BindList_Doituong();
        }