Exemple #1
0
 protected void lnk_Delete_Click(object sender, System.EventArgs e)
 {
     if (!base.IsAuthorizedOp(ActionType.Delete.ToString()))
     {
         base.ShowAjaxMsg(this.UpdatePanel1, "Không có thẩm quyền");
     }
     else
     {
         int           @int     = WebUtils.GetInt((sender as LinkButton).CommandArgument);
         AreaModelInfo dataById = AreaModel.GetDataById(@int);
         if (dataById == null)
         {
             base.ShowAjaxMsg(this.UpdatePanel1, "Những thông tin này không được tìm thấy, các dữ liệu không tồn tại hoặc đã bị xóa");
         }
         else if (AreaModel.Delete(@int))
         {
             this.BindData();
             PageBase.log.AddEvent(base.LoginAccount.AccountName, "删除区域模板[" + dataById.ModelName + "] thành công");
             base.ShowAjaxMsg(this.UpdatePanel1, "Thao tác thành công");
         }
         else
         {
             base.ShowAjaxMsg(this.UpdatePanel1, "Thao tác thất bại");
         }
     }
 }
Exemple #2
0
 protected void btn_DelBat_Click(object sender, System.EventArgs e)
 {
     if (!base.IsAuthorizedOp(ActionType.Delete.ToString()))
     {
         base.ShowAjaxMsg(this.UpdatePanel1, "Không có thẩm quyền");
     }
     else
     {
         string repeaterCheckIDs = base.GetRepeaterCheckIDs(this.Repeater1, "chk", "autoid");
         if (!string.IsNullOrEmpty(repeaterCheckIDs))
         {
             if (AreaModel.Delete(repeaterCheckIDs))
             {
                 this.BindData();
                 PageBase.log.AddEvent(base.LoginAccount.AccountName, "批量删除区域模板成功");
                 base.ShowAjaxMsg(this.UpdatePanel1, "Thao tác thành công");
             }
             else
             {
                 base.ShowAjaxMsg(this.UpdatePanel1, "Thao tác thất bại");
             }
         }
     }
 }