Exemple #1
0
        protected override bool SaveData()
        {
            view.CloseEditor();
            bsGrid.EndEdit();

            DS_WarehouseDescription.SP_GetWarehouseDescriptionDetailDataTable t1 = DataSetHelper.PackAlternationTypedDataTable <DS_WarehouseDescription.SP_GetWarehouseDescriptionDetailDataTable>(ds_WarehouseDescription.SP_GetWarehouseDescriptionDetail);
            DataSetHelper.RemoveColumns(t1, true,
                                        t1.WarehouseDescriptionDetailIDColumn,
                                        t1.OrdinalNumberColumn,
                                        t1.ProductIDColumn,
                                        t1.MedicamentIDColumn,
                                        t1.CountryCodeColumn,
                                        t1.BrandIDColumn,
                                        t1.UnitPriceColumn,
                                        t1.QuantityColumn,
                                        t1.DescrQtyColumn,
                                        t1.CommentColumn,
                                        t1.ActionColumn
                                        );

            var id = ProductionManager.AddOrEditWarehouseDescription(WarehouseDescriptionID, BranchID, Date, ProductCount, ProductQty, DescrQty, ProductTotalDue, DescrTotalDue, CurrencyCode, DataSetHelper.InnerBytesData(t1), Status, CreateDate, CreatorID, BaseGlobalVariable.ServerDateTime, BaseGlobalVariable.UserID, ApproverID, Action);

            if (id > 0)
            {
                WarehouseDescriptionID = id;

                if (!OptionsEditForm.IsSaveAndCloseExecuting)
                {
                    BindingDetail();
                }
            }
            return(id > 0);
        }