Beispiel #1
0
        protected void StockOperationGrid_CustomButtonCallback(object sender, ASPxGridViewCustomButtonCallbackEventArgs e)
        {
            var row = (StockOperationGrid.GetRow(e.VisibleIndex) as StockOperation);

            if (row == null)
            {
                return;
            }

            if (e.ButtonID == "Approve")
            {
                var xml = string.Format(@"<data>
                                    <stock_operation_id> {0} </stock_operation_id>
                                  </data>", row.ID);

                row.TX_StockOperations(2, xml);
            }

            if (e.ButtonID == "Undo")
            {
                var xml = string.Format(@"<data>
                                    <stock_operation_id> {0} </stock_operation_id>
                                  </data>", row.ID);

                row.TX_StockOperations(3, xml);
            }

            StockOperationGrid.DataBind();
        }
Beispiel #2
0
        protected void StockOperationGrid_HtmlRowCreated(object sender, ASPxGridViewTableRowEventArgs e)
        {
            var row = (StockOperationGrid.GetRow(e.VisibleIndex) as StockOperation);

            if (row == null)
            {
                return;
            }

            if (!row.NeedsConfirmation)
            {
                e.Row.Cells[9].Controls[0].Visible = false;
            }

            if (!row.IsUndoAllowed)
            {
                e.Row.Cells[9].Controls[1].Visible = false;
            }
        }