//public override void InvalidateToolbar() //{ // base.InvalidateToolbar(); // SaleOrderEntities entity = (SaleOrderEntities)CurrentModuleEntity; // ARSaleOrdersInfo mainObject = (ARSaleOrdersInfo)entity.MainObject; // ParentScreen.SetEnableOfToolbarButton("Approved", false); // ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, true); // if (mainObject.ARSaleOrderID > 0) // { // ParentScreen.SetEnableOfToolbarButton("Approved", true); // if (mainObject.ARSaleOrderStatus == "Approved") // { // ParentScreen.SetEnableOfToolbarButton(BaseToolbar.ToolbarButtonEdit, false); // ParentScreen.SetEnableOfToolbarButton("Approved", false); // } // } //} public override void Invalidate(int iObjectID) { base.Invalidate(iObjectID); ARCustomerPaymentsInfo objCustomerPaymentsInfo = (ARCustomerPaymentsInfo)CurrentModuleEntity.MainObject; ARCustomerPaymentDetailsGridControl gridControl = (ARCustomerPaymentDetailsGridControl)Controls[CustomerPaymentModule.CustomerPaymentDetailsGridControlName]; gridControl.PaymentAmount = objCustomerPaymentsInfo.ARCustomerPaymentTotalAmount; }
public void UpdateTotalAmount() { CustomerPaymentEntities entity = (CustomerPaymentEntities)CurrentModuleEntity; ARCustomerPaymentsInfo mainObject = (ARCustomerPaymentsInfo)CurrentModuleEntity.MainObject; entity.UpdateTotalAmount(); ARCustomerPaymentDetailsGridControl gridControl = (ARCustomerPaymentDetailsGridControl)Controls[CustomerPaymentModule.CustomerPaymentDetailsGridControlName]; gridControl.PaymentAmount = mainObject.ARCustomerPaymentTotalAmount; gridControl.ProposeRemainingAmount(); }
public CustomerPaymentModule() { this.CurrentModuleName = "CustomerPayment"; CurrentModuleEntity = new CustomerPaymentEntities(); CurrentModuleEntity.Module = this; InitializeModule(); CustomerPaymentEntities entity = (CustomerPaymentEntities)CurrentModuleEntity; ARCustomerPaymentDetailsGridControl gridControl = Controls[CustomerPaymentModule.CustomerPaymentDetailsGridControlName] as ARCustomerPaymentDetailsGridControl; gridControl.CustomerPaymentDetailList = entity.CustomerPaymentDetailsList; gridControl.InitGridControlDataSource(); }