Skip to content

Instantly share code, notes, and snippets.

View Macadoshis's full-sized avatar

Saad BENBOUZID Macadoshis

View GitHub Profile
{
"watchGeneralDescription": {
"SerialNumber": "sqdsqd",
"Brand": {
"RefId": 2,
"RefLabel": "Tudor"
},
"CommercialReferenceNumber": null,
"ManufacturingDate": "2018-04-07T00:00:00.000Z",
"Id": 2,
ALTER TABLE [EstimationSparePart]
ADD
[IsFreeOfCharge] BIT NULL,
[IsFreeOfChargeInitial] BIT NULL
GO
UPDATE [EstimationSparePart] SET [IsFreeOfCharge] = 0, [IsFreeOfChargeInitial] = 0
GO
ALTER TABLE [EstimationSparePart] ALTER COLUMN IsFreeOfCharge BIT NOT NULL
GO
ALTER TABLE [EstimationSparePart] ALTER COLUMN IsFreeOfChargeInitial BIT NOT NULL
ALTER TABLE [EstimationSparePart]
ADD
[IsFreeOfCharge] BIT NULL,
[IsFreeOfChargeInitial] BIT NULL
GO
UPDATE [EstimationSparePart]
SET [IsFreeOfCharge] = 0, [IsFreeOfChargeInitial] = 0
GO
ALTER TABLE [EstimationSparePart]
ALTER COLUMN IsFreeOfCharge BIT NOT NULL
import { ServiceFolderStatusCategory } from '../../../../../Logiciels/workspaces/CMSS/CMSS.Client/src/app/enums/service-folder-management/service-folder-status-category';
private onChangeSelectedColumns(userPreference: IUserPreferenceType,
doWithWorkshopPreference: (workshopPreference: IWorkshopPreferenceType) => void,
doWithQuotationPreference: (quotationPreference: IQuotationPreferenceType) => void,
doWithInvoicingPreference: (invoicingPreference: IInvoicingPreferenceType) => void,
doWithEstimationPreference: (estimationPreference: IEstimationPreferenceType) => void,
doWithDeliveryPreference: (deliveryPreference: IDeliveryPreferenceType) => void,
doWithRegistrationPreference: (registrationPreference: IRegistrationPreferenceType) => void,
doWithAllPreference: (allPreference: IAllPreferenceType) => void
private getTotalPriceWithoutVat(qwis: CWIE[], includeShippingCost: boolean = false): QuotationPrice {
if (!this._serviceFolder.Refused) {
const quotationPrice: QuotationPrice = <QuotationPrice>({ public: 0, sales: 0 });
// Sum all prices of selected work instructions
qwis
.filter((qwi: CWIE) => this.filterWorkInstructionForTotalPrice(qwi))
.forEach((qwie: CWIE) => {
quotationPrice.public += (qwie.PublicPriceWithDiscount || 0);
quotationPrice.sales += (qwie.SalesPriceWithDiscount || 0);
@Macadoshis
Macadoshis / last-user.patch
Created November 1, 2018 17:28
last-user (patch)
Index: CMSS.RestInterface/Models/Core/IRestEntity.cs
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- CMSS.RestInterface/Models/Core/IRestEntity.cs (date 1541062513000)
+++ CMSS.RestInterface/Models/Core/IRestEntity.cs (date 1541093268418)
@@ -11,5 +11,7 @@
DateTime? UpdatedDate { get; set; }
// ------------------------
// Cas 2 : ta version
// ------------------------
var b = 1;
var c = 0;
if (b == 1) {
var filterFunc = 99;
c += filterFunc;
} else {
@Injectable()
export class ServiceFolderRouteResolver implements Resolve<IServiceFolder> {
constructor(private serviceFolderController: ServiceFolderController,
private serviceFolderService: ServiceFolderService,
@Inject(CURRENT_SERVICE_FOLDER) private currentServiceFolder: CurrentServiceFolder) {
}
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<IServiceFolder> {
const idServiceFolder = getIdServiceFolder(route);
package ch.vd.dfin.taopm.web.config;
import static ch.vd.dfin.taopm.web.config.TaoPMSpringBootApplication.CLASSPATH_APPLICATION_PROPERTIES;
import static ch.vd.dfin.taopm.web.config.TaoPMSpringBootApplication.FILE_ENVIRONMENT_PROPERTIES;
import java.util.Arrays;
import java.util.Collection;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
namespace CMSS.Domain.Base
{
public class StringPairItemDom : PairItemDom<string>
{
public StringPairItemDom() : this(null, null)
{
}
public StringPairItemDom(int? refId, string refValue) : base(refId, refValue)
{