Exemplo n.º 1
0
        private void PerformRowDelete()
        {
            try
            {
                NameValueCollection values = new NameValueCollection();
                foreach (String text in HttpContext.Current.Request.Form.Keys)
                {
                    values[text] = HttpContext.Current.Request.Form[text];
                }
                GridRowDelete e = new GridRowDelete();
                e.RowKey = values["id"];

                HandleDelete(e);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
 private void HandleDelete(GridRowDelete e)
 {
     try
     {
         IEnumerable retrievedData = (IEnumerable)HttpContext.Current.Session[SessionVarName];
         foreach (Object obj in retrievedData)
         {
             if (((BaseItem)obj).VID == e.RowKey.ToInt())
             {
                 ((BaseItem)obj).Delete();
                 return;
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 3
0
        private void PerformRowDelete()
        {
            try
            {
                NameValueCollection values = new NameValueCollection();
                foreach (String text in HttpContext.Current.Request.Form.Keys)
                {
                    values[text] = HttpContext.Current.Request.Form[text];
                }
                GridRowDelete e = new GridRowDelete();
                e.RowKey = values["id"];

                HandleDelete(e);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 4
0
 private void HandleDelete(GridRowDelete e)
 {
     try
     {
         IEnumerable retrievedData = (IEnumerable)HttpContext.Current.Session[SessionVarName];
         foreach (Object obj in retrievedData)
         {
             if (((BaseItem)obj).VID == e.RowKey.ToInt())
             {
                 ((BaseItem)obj).Delete();
                 return;
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }