Ejemplo n.º 1
0
    //end ets row updating

    /// <summary>
    /// delete row
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void dxgrdETS_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
    {
        ASPxGridView _grd      = (ASPxGridView)sender;
        int          _voyageid = this.dxhfOrder.Contains("voyage") ? wwi_func.vint(this.dxhfOrder.Get("voyage").ToString()) : 0;


        int _etsid = e.Keys["VoyageETSSubID"] != null?wwi_func.vint(e.Keys["VoyageETSSubID"].ToString()) : 0;

        if (_etsid > 0)
        {
            VoyageETSSubTable.Delete(_etsid);
        }
        //MUST call this after insert or error: Specified method is not supported
        e.Cancel = true;
        _grd.CancelEdit();
        //rebind
        bind_ets_grid(_voyageid);
    }
 public bool Delete(object VoyageETSSubID)
 {
     return(VoyageETSSubTable.Delete(VoyageETSSubID) == 1);
 }