////////////////// RC /// <summary> /// /// </summary> /// <param name="parIdReceipt"></param> /// <returns></returns> public override IdReceipt GetNewReceipt(IdReceipt parIdReceipt) { using (var DB = new SQLite(ReceiptFile)) { lock (GetObjectForLockByIdWorkplace(parIdReceipt.IdWorkplace)) { if (parIdReceipt.CodePeriod == 0) { parIdReceipt.CodePeriod = Global.GetCodePeriod(); } parIdReceipt.CodeReceipt = DB.ExecuteScalar <IdReceipt, int>(SqlGetNewReceipt, parIdReceipt); } } return(parIdReceipt); }