コード例 #1
0
ファイル: ucDeliverySchedule.ascx.cs プロジェクト: ewin66/dev
        protected void GridDeliveryPlanning_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
        {
            e.Cancel = true;
            GridDeliveryPlanning.CancelEdit();
            InventoryTransactionBO purchaseInvoiceTransactionBO = new InventoryTransactionBO();

            purchaseInvoiceTransactionBO.UpdateInventoryTransaction(session, Guid.Parse(e.Keys["InventoryTransactionId"].ToString()), (DateTime)e.NewValues["IssueDate"], (string)e.NewValues["Code"], (string)e.NewValues["Description"]);
            GridDeliveryPlanning.DataSource = purchaseInvoiceTransactionBO.GetDeliveryPlanningForBill <PurchaseInvoice>(session, BillId);
            GridDeliveryPlanning.DataBind();
        }
コード例 #2
0
        protected void GridDeliveryPlanning_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
        {
            e.Cancel = true;
            GridDeliveryPlanning.CancelEdit();
            InventoryTransactionBO saleInvoiceTransactionBO = new InventoryTransactionBO();

            saleInvoiceTransactionBO.CreateInventoryTransaction(session, BillId, (DateTime)e.NewValues["IssueDate"], (string)e.NewValues["Code"], (string)e.NewValues["Description"]);
            GridDeliveryPlanning.DataSource = saleInvoiceTransactionBO.GetDeliveryPlanningForBill <NAS.DAL.Invoice.SalesInvoice>(session, BillId);
            GridDeliveryPlanning.DataBind();
        }
コード例 #3
0
ファイル: ucDeliverySchedule.ascx.cs プロジェクト: ewin66/dev
        public void DataBind()
        {
            if (BillId != null)
            {
                if (IsDetailBeforePerformDataSelect)
                {
                    return;
                }

                InventoryCommandBO     inventoryCommandBO           = new InventoryCommandBO();
                InventoryTransactionBO purchaseInvoiceTransactionBO = new InventoryTransactionBO();
                GridDeliveryPlanning.DataSource   = purchaseInvoiceTransactionBO.GetDeliveryPlanningForBill <PurchaseInvoice>(session, BillId);
                GridDeliveryPlanning.KeyFieldName = "InventoryTransactionId";
                GridDeliveryPlanning.DataBind();
                GridDeliveryActual.DataSource   = inventoryCommandBO.GetActualInventoryJournalOfBill(session, BillId, NAS.DAL.CMS.ObjectDocument.DefaultObjectTypeCustomFieldEnum.INVENTORY_OUT_SALE_INVOICE);
                GridDeliveryActual.KeyFieldName = "InventoryJournalId";
                GridDeliveryActual.DataBind();
            }
        }
コード例 #4
0
 protected void GridDeliveryPlanning_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
 {
     NAS.DAL.Invoice.SalesInvoice bill = session.GetObjectByKey <NAS.DAL.Invoice.SalesInvoice>(BillId);
     try
     {
         InventoryTransactionBO saleInvoiceTransactionBO = new InventoryTransactionBO();
         if (bill.RowStatus == 4)
         {
             throw (new Exception("Phiếu đã khóa, không thể thao tác"));
         }
         else
         {
             saleInvoiceTransactionBO.DeleteInventoryTransaction(session, Guid.Parse(e.Keys["InventoryTransactionId"].ToString()));
         }
         e.Cancel = true;
         GridDeliveryPlanning.DataSource = saleInvoiceTransactionBO.GetDeliveryPlanningForBill <NAS.DAL.Invoice.SalesInvoice>(session, BillId);
         GridDeliveryPlanning.DataBind();
     }
     catch (Exception)
     {
         throw;
     }
 }