protected void GridPlanningJournal_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { e.Cancel = true; InventoryJournalBO inventoryJournalBO = new InventoryJournalBO(); ASPxGridView gridview = sender as ASPxGridView; gridview.CancelEdit(); inventoryJournalBO.UpdateInventoryPlanningJournal(session, (Guid)e.Keys[0], Guid.Parse(e.NewValues["ItemUnitId!Key"].ToString()), (double)(e.NewValues["Credit"]), Guid.Parse(e.NewValues["LotId!Key"].ToString()), Guid.Parse(e.NewValues["InventoryId!Key"].ToString()), (string)(e.NewValues["Description"])); gridview.DataSource = inventoryJournalBO.GetDeliveryPlanningJournalForTransaction(session, Guid.Parse(gridview.GetMasterRowKeyValue().ToString())); gridview.DataBind(); }
protected void GridPlanningJournal_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { e.Cancel = true; ASPxGridView gridview = sender as ASPxGridView; //gridview.CancelEdit(); InventoryJournalBO inventoryJournalBO = new InventoryJournalBO(); inventoryJournalBO.DeleteInventoryPlanningJournal(session, Guid.Parse(e.Keys["InventoryJournalId"].ToString())); gridview.DataSource = inventoryJournalBO.GetDeliveryPlanningJournalForTransaction(session, Guid.Parse(gridview.GetMasterRowKeyValue().ToString())); gridview.DataBind(); }
protected void GridPlanningJournal_BeforePerformDataSelect(object sender, EventArgs e) { ASPxGridView gridview = sender as ASPxGridView; InventoryJournalBO inventoryJournalBO = new InventoryJournalBO(); gridview.JSProperties["cpInventoryTransactionId"] = gridview.GetMasterRowKeyValue().ToString(); gridview.KeyFieldName = "InventoryJournalId"; gridview.DataSource = inventoryJournalBO.GetDeliveryPlanningJournalForTransaction(session, Guid.Parse(gridview.GetMasterRowKeyValue().ToString())); IsDetailBeforePerformDataSelect = true; //gridview.DataBind(); }
protected void loadBalanceInfo(Guid InventoryId, Guid ItemUnitId) { COGSData = null; InventoryJournalBO bo = new InventoryJournalBO(); XPCollection <COGS> InventoryJournals = bo.getCOGS( session, InventoryId, ItemUnitId); COGSData = bo.getCOGS(session, Guid.Parse(Session["InventorySelected"].ToString()), ItemUnitId); grdBalanceOfItems.DataSource = COGSData; grdBalanceOfItems.DataBind(); }
protected void loadBalanceInfo(Guid InventoryId, Guid ItemUnitId) { InventoryJournalBO bo = new InventoryJournalBO(); //XPCollection<InventoryJournal> IJLst = bo.getTransactionInventoryJournals(session, InventoryId, ItemUnitId); XPCollection <InventoryLedger> ILLst = bo.getTransactionInventoryLedgers(session, InventoryId, ItemUnitId); //InventoryJournals = IJLst; InventoryLedgers = ILLst; //grdBalanceOfItems.DataSource = InventoryJournals; grdBalanceOfInventoryCart.DataSource = ILLst; //grdBalanceOfItems.DataBind(); grdBalanceOfInventoryCart.DataBind(); }
protected void GridPlanningJournal_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e) { e.Cancel = true; ASPxGridView gridview = sender as ASPxGridView; gridview.CancelEdit(); Guid transactionId = Guid.Parse(gridview.JSProperties["cpInventoryTransactionId"].ToString()); Guid itemUnitId = Guid.Parse(e.NewValues["ItemUnitId!Key"].ToString()); double amount = (double)e.NewValues["Credit"]; Guid lotId = Guid.Parse(e.NewValues["LotId!Key"].ToString()); Guid inventoryId = Guid.Parse(e.NewValues["InventoryId!Key"].ToString()); InventoryJournalBO inventoryJournalBO = new InventoryJournalBO(); inventoryJournalBO.CreateInventoryPlanningJournal(session, transactionId, itemUnitId, amount, lotId, inventoryId, (string)e.NewValues["Description"]); gridview.DataSource = inventoryJournalBO.GetDeliveryPlanningJournalForTransaction(session, Guid.Parse(gridview.GetMasterRowKeyValue().ToString())); gridview.DataBind(); }